-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Print warnings on not being able to load certificates #1132
Comments
Didn't the listen function just fail? |
No, it didn't fail. 😮 |
Possibly related, just to add:
I'm on Ubuntu |
Update: it looks like it only works on chrome desktop, but not on firefox desktop and chrome android. I've tried the following but no luck: let app = null;
let port = null;
const endpoint_domain = 'mydomain.com';
const key_file_name = `/etc/letsencrypt/live/${endpoint_domain}/privkey.pem`;
const cert_file_name = `/etc/letsencrypt/live/${endpoint_domain}/cert.pem`;
const ca_file_name = `/etc/letsencrypt/live/${endpoint_domain}/chain.pem`;
if (fs.existsSync(key_file_name) === true) {
assert(fs.existsSync(cert_file_name) === true);
assert(fs.existsSync(ca_file_name) === true);
app = uws.SSLApp({ key_file_name, cert_file_name, ca_file_name });
port = 443;
} else {
app = uws.App({});
port = 8080;
} Edit: solved with using the following:
const key_file_name = `/etc/letsencrypt/live/${endpoint_domain}/privkey.pem`;
const cert_file_name = `/etc/letsencrypt/live/${endpoint_domain}/fullchain.pem`;
Edit: how do I mark my comment as outdated lol. |
Maybe this should be tied up with logging |
There also seems to be no warnings/errors if uWS is compiled without "WITH_OPENSSL=1" . It compiles and executes without using an ssl context even when the code tells it to. |
Should the fullchain.pem = cert.pem + ca.pem, right? |
Renaming things is always fun but breaks backwards compatibility. So even a bad name kept is better than a good name introduced in many cases. You still are allowed to pass only cert, it works both ways. |
fullchain_file_name is a good name, it can be added as an alias |
I have an SSL app, which ran but all SSL connections failed as the certificates were with incorrect permissions (system admin had messed up).
Knowing that the problem was with the loading of certificates would have been helpful to debug. It took us really long to figure out it was a file issue and not an OpenSSL version issue.
Is there a way to have debug information with the library, so we can catch errors like this?
Thanks,
Aisha
The text was updated successfully, but these errors were encountered: