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

Exception: use_certificate_chain_file: asio.ssl error #1143

Open
timbo100 opened this issue Sep 17, 2024 · 0 comments
Open

Exception: use_certificate_chain_file: asio.ssl error #1143

timbo100 opened this issue Sep 17, 2024 · 0 comments

Comments

@timbo100
Copy link

I'm unsure what exactly this error message is saying when attempting to run the echo_server_tls example:

websocketpp/build$ bin/echo_server_tls 
on_tls_init called with hdl: 0x5a04750154a0
using TLS mode: Mozilla Intermediate
Exception: use_certificate_chain_file: asio.ssl error

I first assumed I was not generating keys and SS cert properly using the following command:

websocketpp/examples/echo_server_tls$ openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 3650 -nodes -subj "/C=XX/ST=Alabama/L=HSV/O=Company/OU=Engineering/CN=localhost"

But no joy with below linds. Then I thought to make the filename invalid, and still got same error, so in the echo_server_tls example the lines:

        ctx->use_certificate_chain_file("~/workspace/Websocketlibs/websocketpp/examples/echo_server_tls/cert.pem");
        ctx->use_private_key_file("~/workspace/Websocketlibs/websocketpp/examples/echo_server_tls/key.pem", asio::ssl::context::pem);

Don't appear to be reached or executed properly. since renaming key.pem to keyx.pem and cert.pem to certx.pem did not change the error message.

  1. please confirm that I'm generating self-signed cert and keys for testing properly
  2. what does this error mean and how do I fix it??

Thx

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

1 participant