wolfSSL: Fix TLS 1.3 session handling

Uses the changes to wolfSSL found in
https://github.com/wolfSSL/wolfssl/pull/5078

Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
This commit is contained in:
Juliusz Sosinowicz 2022-04-25 16:18:49 +02:00 committed by Jouni Malinen
parent 0c3f68f2a0
commit a40e48fbe1

View file

@ -410,10 +410,13 @@ int tls_connection_shutdown(void *tls_ctx, struct tls_connection *conn)
wolfSSL_set_quiet_shutdown(conn->ssl, 1);
wolfSSL_shutdown(conn->ssl);
session = wolfSSL_get_session(conn->ssl);
if (wolfSSL_clear(conn->ssl) != 1)
session = wolfSSL_get1_session(conn->ssl);
if (wolfSSL_clear(conn->ssl) != 1) {
wolfSSL_SESSION_free(session);
return -1;
}
wolfSSL_set_session(conn->ssl, session);
wolfSSL_SESSION_free(session);
return 0;
}