Merge pull request #2282 from SparkiDev/certvfy_tls13

Free RSA key later in TLS v1.3 CertificateVerify
This commit is contained in:
toddouska
2019-06-24 15:54:04 -07:00
committed by GitHub

View File

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