wolfSSL_i2o_ECPublicKey: use uncompressed when selected

This commit is contained in:
Juliusz Sosinowicz
2025-01-03 14:24:19 +01:00
parent 239b85c804
commit 5ee8af2351

View File

@ -12234,7 +12234,7 @@ int wolfSSL_i2o_ECPublicKey(const WOLFSSL_EC_KEY *key, unsigned char **out)
if (ret == 1) {
#ifdef HAVE_COMP_KEY
/* Default to compressed form if not set */
form = (key->form != WC_POINT_CONVERSION_UNCOMPRESSED) ?
form = (key->form == WC_POINT_CONVERSION_UNCOMPRESSED) ?
WC_POINT_CONVERSION_UNCOMPRESSED :
WC_POINT_CONVERSION_COMPRESSED;
#endif