forked from wolfSSL/wolfssl
SSL: make temp X25519/X448 key failure
On failure to make the temporary X25519/X448 key, free it as the type is stored in eccTempKeyPresent which also indicates a valid key is present. Otherwise on SSL free, it will default to freeing the key with ECC APIs.
This commit is contained in:
@@ -32894,6 +32894,10 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
|
||||
ssl->eccTempKeyPresent =
|
||||
DYNAMIC_TYPE_CURVE25519;
|
||||
}
|
||||
else {
|
||||
FreeKey(ssl, DYNAMIC_TYPE_CURVE25519,
|
||||
(void**)&ssl->eccTempKey);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -32917,6 +32921,10 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
|
||||
ssl->eccTempKeyPresent =
|
||||
DYNAMIC_TYPE_CURVE448;
|
||||
}
|
||||
else {
|
||||
FreeKey(ssl, DYNAMIC_TYPE_CURVE448,
|
||||
(void**)&ssl->eccTempKey);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user