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

version 4.3 error E: SSL_new failed: error:00000063:lib(0)::reason(99) #3059

Open
williamfjm opened this issue Feb 3, 2024 · 4 comments
Open

Comments

@williamfjm
Copy link

hello ,im new using libewebsockets ,but I think I found a bug , with version 4.3 and openssl v3.0.11

wheen i try compile previus version like 4.1 i have this issue
/root/ws/libwebsockets_4.2_mal/lib/tls/openssl/openssl-server.c: In function ‘lws_tls_server_certs_load’:
/root/ws/libwebsockets_4.2_mal/lib/tls/openssl/openssl-server.c:403:9: error: ‘EC_KEY_new_by_curve_name’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
403 | ecdh = EC_KEY_new_by_curve_name(ecdh_nid);
i think this could be a clue.
Is this problem documented?

@lws-team
Copy link
Member

lws-team commented Feb 3, 2024

At context creation time, info.options has LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT when creating the context?

@williamfjm
Copy link
Author

yes ,i do

struct lws_context_creation_info info;

memset(&info, 0, sizeof(info));
info.port = CONTEXT_PORT_NO_LISTEN;
info.options = LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT;
info.protocols = protocols;
context = lws_create_context(&info);
if (context == NULL) {
    fprintf(stderr, "error libwebsockets\n");
    return -1;
}

// Configura la información de la conexión WebSocket
memset(&connect_info, 0, sizeof(connect_info));

connect_info.context = context;
connect_info.port =1111;
connect_info.address = "xxxxxxxxxxxxxx";
connect_info.path = "/";
connect_info.host = connect_info.address;
connect_info.origin = connect_info.address;
connect_info.ssl_connection = ssl_connection;
connect_info.protocol = pro;
connect_info.local_protocol_name = "lws-minimal-client";
  struct lws *wsi = lws_client_connect_via_info(&connect_info);
  
  this is part of my code it works on version 4.1 

@Arthur-Lili-Pendragon
Copy link

I also encountered the same error message, but I did not assign a value to info.options. May I ask how to resolve this error?

@lws-team
Copy link
Member

lws-team commented May 8, 2024

info.options at context creation time must at least have LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT, else openssl doesn't get started

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