Do you want to install a HTTPS-capable web server on your Apple TV? If so, continue reading below to find out how the open source yaSSL Embedded Web Server can easily be installed on the second generation Apple TV.
Following our port of wolfSSL to the second generation Apple TV, our next step was to get the yaSSL Embedded Web Server running on the Apple TV. Having a web server running on the Apple TV brings with it many benefits including the ability to host a website from a very small, energy-efficient, discreet, and quiet device.
If you missed our post on porting wolfSSL to the Apple TV, you can read it here: Running wolfSSL on the Apple TV 2. If you would like to install the yaSSL Embedded Web Server on your Apple TV with HTTPS support, follow the instructions in our previous post prior to installing yasslEWS. Note that you will need to build wolfSSL with either the –enable-opensslExtra or –enable-webServer build option.
1. Jailbroken second generation Apple TV (we leave this step for you to do)
2. wolfSSL installed on Apple TV for HTTPS support (see link above)
1. Compiling the Web Server
In order to easily compile the yaSSL Embedded Web Server for iOS (specifically the Apple TV), we added a new target to the makefile. You can download our updated yasslEWS makefile, here: Updated yasslEWS iOS Makefile.
After placing the new Makefile in your yasslEWS directory, simply run the following command. This will build yasslEWS for iOS and the ARM architecture.
1. Web Server Installation
After compiling the web server, move the application and configuration file to the Apple TV using your favorite FTP client. We chose to place the yaSSL Embedded Web Server in the following location on the Apple TV.
1. Running the Web Server
If you followed our previous instructions on installing wolfSSL on the Apple TV, the wolfSSL libraries should be located at “/usr/local/cyassl_atv2”. To make sure the loader can find them, you’ll need to set the path:
Then, to start the web server with both insecure (HTTP) and secure (HTTPS) ports, issue the following command. Keep in mind that you can set runtime options either on the command line during startup or in the configuration file (yasslEWS.conf). The yaSSL Embedded Web Server will automatically load the configuration file name “yasslEWS.conf” if present in the same directory as the executable. For a list of config options, use the “./yasslEWS -h” command.
./yasslEWS -s server.pem -p 8080,8081s -e error.txt
1. Build Sizes
One of the great things about using wolfSSL and the yaSSL Embedded Web Server is that they have been designed and optimized to run on embedded devices – thus giving them an extremely small footprint. Below you can see the sizes on disk of the compiled wolfSSL library and yaSSL Embedded Web Server using the above methods for the Apple TV – a total disk footprint of 181 kB for both SSL and a web server!
122 kB Footprint
Full Feature Set
Standards up to the current TLS 1.2
yaSSL Embedded Web Server
Full Feature Set
For more information about the wolfSSL embedded SSL library or the yaSSL Embedded Web Server, please visit their respective product pages (wolfSSL, yaSSLEWS). yaSSL products are open source and dual licensed under both the GPLv2 as well as standard commercial licensing.
If you have any questions or comments, please let us know at firstname.lastname@example.org. We’re interested in hearing what you think!