mirror of https://github.com/openssl/openssl
Clear old messages from queues in order to avoid leaks of record layer objects.
This commit is contained in:
parent
28e5302333
commit
6adbb3057d
|
@ -719,6 +719,14 @@ int tls13_change_cipher_state(SSL_CONNECTION *s, int which)
|
|||
? OSSL_RECORD_PROTECTION_LEVEL_HANDSHAKE
|
||||
: OSSL_RECORD_PROTECTION_LEVEL_APPLICATION);
|
||||
|
||||
if (SSL_CONNECTION_IS_DTLS(s)) {
|
||||
/* We have moved to the next flight lets clear out old messages */
|
||||
if (direction == OSSL_RECORD_DIRECTION_READ)
|
||||
dtls1_clear_received_buffer(s);
|
||||
else
|
||||
dtls1_clear_sent_buffer(s);
|
||||
}
|
||||
|
||||
if (!ssl_set_new_record_layer(s, s->version,
|
||||
direction,
|
||||
level, secret, hashlen, key, keylen, iv,
|
||||
|
|
Loading…
Reference in New Issue