Free RSA key later in TLS v1.3 CertificateVerify

This commit is contained in:
Sean Parkinson
2019-06-19 08:39:15 +10:00
parent 2cf4a74b47
commit c500fd5a86

View File

@ -5835,9 +5835,6 @@ static int DoTls13CertificateVerify(WOLFSSL* ssl, byte* input,
if (ret >= 0) { if (ret >= 0) {
args->sendSz = ret; args->sendSz = ret;
ret = 0; ret = 0;
FreeKey(ssl, DYNAMIC_TYPE_RSA, (void**)&ssl->peerRsaKey);
ssl->peerRsaKeyPresent = 0;
} }
} }
#endif /* !NO_RSA */ #endif /* !NO_RSA */
@ -5901,6 +5898,9 @@ static int DoTls13CertificateVerify(WOLFSSL* ssl, byte* input,
args->output, args->sendSz); args->output, args->sendSz);
if (ret != 0) if (ret != 0)
goto exit_dcv; goto exit_dcv;
FreeKey(ssl, DYNAMIC_TYPE_RSA, (void**)&ssl->peerRsaKey);
ssl->peerRsaKeyPresent = 0;
} }
#endif /* !NO_RSA */ #endif /* !NO_RSA */