forked from wolfSSL/wolfssl
free old peer RSA key in secure renegotiation when getting new one
This commit is contained in:
@ -10102,6 +10102,15 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte* input, word32* inOutIdx,
|
|||||||
ssl->peerRsaKeyPresent = 1;
|
ssl->peerRsaKeyPresent = 1;
|
||||||
#ifdef HAVE_PK_CALLBACKS
|
#ifdef HAVE_PK_CALLBACKS
|
||||||
#ifndef NO_RSA
|
#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 =
|
ssl->buffers.peerRsaKey.buffer =
|
||||||
(byte*)XMALLOC(args->dCert->pubKeySize,
|
(byte*)XMALLOC(args->dCert->pubKeySize,
|
||||||
ssl->heap, DYNAMIC_TYPE_RSA);
|
ssl->heap, DYNAMIC_TYPE_RSA);
|
||||||
|
Reference in New Issue
Block a user