mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 02:37:28 +02:00
wolfSSL_set_session_secret_cb: fix for NULL input
This commit is contained in:
@ -10476,9 +10476,11 @@ int wolfSSL_set_session_secret_cb(WOLFSSL* ssl, SessionSecretCb cb, void* ctx)
|
||||
|
||||
ssl->sessionSecretCb = cb;
|
||||
ssl->sessionSecretCtx = ctx;
|
||||
/* If using a pre-set key, assume session resumption. */
|
||||
ssl->session->sessionIDSz = 0;
|
||||
ssl->options.resuming = 1;
|
||||
if (cb != NULL) {
|
||||
/* If using a pre-set key, assume session resumption. */
|
||||
ssl->session->sessionIDSz = 0;
|
||||
ssl->options.resuming = 1;
|
||||
}
|
||||
|
||||
return WOLFSSL_SUCCESS;
|
||||
}
|
||||
|
Reference in New Issue
Block a user