devserver
devserver copied to clipboard
SSL key error on fedora 33
Hey, great tool! I'm getting a crash when I run on fedora, seems the cert is too small:
Serving [...] at [ https://localhost:8080 ] or [ http://localhost:8080 ]
Automatic reloading is enabled!
Stop with Ctrl+C
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Normal(ErrorStack([Error { code: 336245135, library: "SSL routines", function: "SSL_CTX_use_certificate", reason: "ee key too small", file: "ssl/ssl_rsa.c", line: 301 }]))', /home/arlyon/.cargo/registry/src/github.com-1ecc6299db9ec823/devserver_lib-0.1.7/src/lib.rs:121:47
stack backtrace:
0: rust_begin_unwind
at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/panicking.rs:475
1: core::panicking::panic_fmt
at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/core/src/panicking.rs:85
2: core::option::expect_none_failed
at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/core/src/option.rs:1221
3: devserver_lib::run
4: devserver::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Here's the failing line: https://github.com/kettle11/devserver/blob/c9827261b88345fdb353e5a583c3a967492b34f2/devserver_lib/src/lib.rs#L121
Should we regenerate and bundle a new cert? Seems the error happens when using keys equal or less than 2048 in length
Thanks for the report! That's a good catch.
And yup, the certificate will definitely have to be regenerated.
Same happens on Ubuntu 20.04.2 LTS x86_64
Sorry for the delay on this fix!
I pushed a new version of devserver
with a key size of 2048. Let me know if it fixes the issue!
It works on Ubuntu 20.04.2 LTS x86_64 with the latest version devserver v0.4.0