free old peer RSA key in secure renegotiation when getting new one
This commit is contained in:
parent
6c9fac2a71
commit
a6cc9af1fc
@ -10102,6 +10102,15 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte* input, word32* inOutIdx,
|
||||
ssl->peerRsaKeyPresent = 1;
|
||||
#ifdef HAVE_PK_CALLBACKS
|
||||
#ifndef NO_RSA
|
||||
#ifdef HAVE_SECURE_RENEGOTIATION
|
||||
if (ssl->buffers.peerRsaKey.buffer) {
|
||||
XFREE(ssl->buffers.peerRsaKey.buffer,
|
||||
ssl->heap, DYNAMIC_TYPE_RSA);
|
||||
ssl->buffers.peerRsaKey.buffer = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
ssl->buffers.peerRsaKey.buffer =
|
||||
(byte*)XMALLOC(args->dCert->pubKeySize,
|
||||
ssl->heap, DYNAMIC_TYPE_RSA);
|
||||
|
Loading…
x
Reference in New Issue
Block a user