mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 04:04:39 +02:00
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 =
|
ssl->eccTempKeyPresent =
|
||||||
DYNAMIC_TYPE_CURVE25519;
|
DYNAMIC_TYPE_CURVE25519;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
FreeKey(ssl, DYNAMIC_TYPE_CURVE25519,
|
||||||
|
(void**)&ssl->eccTempKey);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -32917,6 +32921,10 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
|
|||||||
ssl->eccTempKeyPresent =
|
ssl->eccTempKeyPresent =
|
||||||
DYNAMIC_TYPE_CURVE448;
|
DYNAMIC_TYPE_CURVE448;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
FreeKey(ssl, DYNAMIC_TYPE_CURVE448,
|
||||||
|
(void**)&ssl->eccTempKey);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user