notandy / ympd

Standalone MPD Web GUI written in C, utilizing Websockets and Bootstrap/JS
http://www.ympd.org
GNU General Public License v2.0
523 stars 144 forks source link

Compile mongoose with SSL support #97

Closed SuperBFG7 closed 8 years ago

SuperBFG7 commented 9 years ago

Hi notandy

I propose to compile mongoose with SSL support for people like me who are accessing ympd over the internet. I added a WITH_SSL option to the cmake process and set the default to ON (just change to OFF if you do not want SSL enabled by default)

After that all one needs to do to is: 1) create a certificate (key and cert in the same file), example: # openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 1000 -nodes # cat key.pem cert.pem > ssl.pem

2) tell ympd to use a webport using SSL and where to find the certificate: # ./ympd -w "ssl://8081:/path/to/ssl.pem"

cheers! Daniel