1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

openssl: Add lws ctx ref to client vhost's SSL_CTX

Adds a reference to the libwebsockets context to the OpenSSL context
used by the client vhost. This allows SSL info callbacks to work
correctly for clients, like it currently does for servers.

Co-authored-by: Marty Flickinger <marty.flickinger@garmin.com>
Signed-off-by: Marty Flickinger <marty.flickinger@garmin.com>
Signed-off-by: Nate Karstens <nate.karstens@garmin.com>
This commit is contained in:
Nate Karstens 2023-10-20 13:25:09 -05:00 committed by Andy Green
parent c012b12589
commit 051dfbdb7d

View file

@ -868,6 +868,10 @@ lws_tls_client_create_vhost_context(struct lws_vhost *vh,
return 1;
}
SSL_CTX_set_ex_data(vh->tls.ssl_client_ctx,
openssl_SSL_CTX_private_data_index,
(char *)vh->context);
lws_plat_vhost_tls_client_ctx_init(vh);
tcr = lws_zalloc(sizeof(*tcr), "client ctx tcr");