mirror of
https://github.com/brunoos/luasec.git
synced 2025-02-19 02:12:47 +01:00
Update the Lua state reference on the selected SSL context after SNI
Thanks Kim Alvefur
This commit is contained in:
parent
eedebb2477
commit
8cba350f37
@ -747,6 +747,8 @@ static int sni_cb(SSL *ssl, int *ad, void *arg)
|
|||||||
lua_pop(L, 4);
|
lua_pop(L, 4);
|
||||||
/* Found, use this context */
|
/* Found, use this context */
|
||||||
if (newctx) {
|
if (newctx) {
|
||||||
|
p_context pctx = (p_context)SSL_CTX_get_app_data(newctx);
|
||||||
|
pctx->L = L;
|
||||||
SSL_set_SSL_CTX(ssl, newctx);
|
SSL_set_SSL_CTX(ssl, newctx);
|
||||||
return SSL_TLSEXT_ERR_OK;
|
return SSL_TLSEXT_ERR_OK;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user