Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I enable the optional SSL support? #14

Open
NautillusSs opened this issue Aug 11, 2023 · 2 comments
Open

How can I enable the optional SSL support? #14

NautillusSs opened this issue Aug 11, 2023 · 2 comments

Comments

@NautillusSs
Copy link

Trying to understand the GNU make file and the USE_SSL variable. What sets it to true? I looked around in your code and website but cannot figure it out.
Does it check for the local presence of the openssl header?
If I were to create a Dockerfile like https://github.com/ourway/docker-webfsd/blob/main/Dockerfile should I simply install the openssl package?

Thank you for any help!
Great little server. It's the only one I've found so far that supports byte ranges and works out of the box for streaming videos.

@PierceNg
Copy link

PierceNg commented Oct 3, 2023

Make it:

$ make -e USE_SSL=yes -e USE_SENDFILE=yes

Run it:

$ ./webfsd -F -4 -p 8443 -S -C ssl/server.pem
SSL cert load error [error:140AB18F:SSL routines:SSL_CTX_use_certificate:ee key too small]
SSL privkey load error [error:00000000:lib(0):func(0):reason(0)]

Ok the bundled server certificate was generated in 2002 with a 1024-bit RSA key. Too small for today's Internet. To generate your own self-signed certificate:

$ openssl genrsa -out selfsigned.key 4096
<blah blah>
$ openssl req -key selfsigned.key -new -out selfsigned.csr
<blah blah>
$ openssl x509 -req -days 365 -in selfsigned.csr -signkey selfsigned.key -out selfsigned.crt
<blah blah>
$ rm selfsigned.csr
$ cat selfsigned.crt selfsigned.key > selfsigned.cert_key.pem

Run:

$ ./webfsd -F -4 -p 8443 -S -C selfsigned.cert_key.pem

@38github
Copy link

Really helpful information here. Can this be added to the documentation/man, please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants