mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 10:47:28 +02:00
Restore StoreKeys functionality for TLS case
This commit is contained in:
committed by
Unknown
parent
c2ca9f614e
commit
d2542dcf38
19
src/keys.c
19
src/keys.c
@ -3236,18 +3236,19 @@ int StoreKeys(WOLFSSL* ssl, const byte* keyData, int side)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_SECURE_RENEGOTIATION
|
#ifdef HAVE_SECURE_RENEGOTIATION
|
||||||
if (ssl->options.dtls &&
|
if (ssl->secure_renegotiation &&
|
||||||
ssl->secure_renegotiation &&
|
|
||||||
ssl->secure_renegotiation->cache_status == SCR_CACHE_NEEDED) {
|
ssl->secure_renegotiation->cache_status == SCR_CACHE_NEEDED) {
|
||||||
keys = &ssl->secure_renegotiation->tmp_keys;
|
keys = &ssl->secure_renegotiation->tmp_keys;
|
||||||
#ifdef WOLFSSL_DTLS
|
#ifdef WOLFSSL_DTLS
|
||||||
/* epoch is incremented after StoreKeys is called */
|
if (ssl->options.dtls) {
|
||||||
ssl->secure_renegotiation->tmp_keys.dtls_epoch = ssl->keys.dtls_epoch + 1;
|
/* epoch is incremented after StoreKeys is called */
|
||||||
/* we only need to copy keys on second and future renegotiations */
|
ssl->secure_renegotiation->tmp_keys.dtls_epoch = ssl->keys.dtls_epoch + 1;
|
||||||
if (ssl->keys.dtls_epoch > 1)
|
/* we only need to copy keys on second and future renegotiations */
|
||||||
scr_copy = 1;
|
if (ssl->keys.dtls_epoch > 1)
|
||||||
ssl->encrypt.src = KEYS_NOT_SET;
|
scr_copy = 1;
|
||||||
ssl->decrypt.src = KEYS_NOT_SET;
|
ssl->encrypt.src = KEYS_NOT_SET;
|
||||||
|
ssl->decrypt.src = KEYS_NOT_SET;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
CacheStatusPP(ssl->secure_renegotiation);
|
CacheStatusPP(ssl->secure_renegotiation);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user