mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-03 12:44:45 +02:00
free ecc keys at the end of handshaking
This commit is contained in:
@@ -1312,10 +1312,14 @@ void SSL_ResourceFree(CYASSL* ssl)
|
||||
FreeStreams(ssl);
|
||||
#endif
|
||||
#ifdef HAVE_ECC
|
||||
ecc_free(&ssl->peerEccKey);
|
||||
ecc_free(&ssl->peerEccDsaKey);
|
||||
ecc_free(&ssl->eccTempKey);
|
||||
ecc_free(&ssl->eccDsaKey);
|
||||
if (ssl->peerEccKeyPresent)
|
||||
ecc_free(&ssl->peerEccKey);
|
||||
if (ssl->peerEccDsaKeyPresent)
|
||||
ecc_free(&ssl->peerEccDsaKey);
|
||||
if (ssl->eccTempKeyPresent)
|
||||
ecc_free(&ssl->eccTempKey);
|
||||
if (ssl->eccDsaKeyPresent)
|
||||
ecc_free(&ssl->eccDsaKey);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1358,6 +1362,25 @@ void FreeHandshakeResources(CYASSL* ssl)
|
||||
ssl->peerRsaKey = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ECC
|
||||
if (ssl->peerEccKeyPresent) {
|
||||
ecc_free(&ssl->peerEccKey);
|
||||
ssl->peerEccKeyPresent = 0;
|
||||
}
|
||||
if (ssl->peerEccDsaKeyPresent) {
|
||||
ecc_free(&ssl->peerEccDsaKey);
|
||||
ssl->peerEccDsaKeyPresent = 0;
|
||||
}
|
||||
if (ssl->eccTempKeyPresent) {
|
||||
ecc_free(&ssl->eccTempKey);
|
||||
ssl->eccTempKeyPresent = 0;
|
||||
}
|
||||
if (ssl->eccDsaKeyPresent) {
|
||||
ecc_free(&ssl->eccDsaKey);
|
||||
ssl->eccDsaKeyPresent = 0;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user