diff mbox series

[07/24] openssl: Use uncompressed format for ECC keys

Message ID 20240404181630.2431991-7-juliusz@wolfssl.com
State New
Headers show
Series [01/24] wolfssl: simplify tls_get_cipher | expand

Commit Message

Juliusz Sosinowicz April 4, 2024, 6:16 p.m. UTC
OpenSSL <3.0 uses ECC keys in the uncompressed format. We should keep it that way for compatibility. The wolfSSL backend also uses the uncompressed format.

Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
---
 src/crypto/crypto_openssl.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/src/crypto/crypto_openssl.c b/src/crypto/crypto_openssl.c
index 2d8ff60aa9..e83a40b57c 100644
--- a/src/crypto/crypto_openssl.c
+++ b/src/crypto/crypto_openssl.c
@@ -3676,6 +3676,8 @@  struct wpabuf * crypto_ec_key_get_ecprivate_key(struct crypto_ec_key *key,
 				       0);
 		pkey = copy;
 	}
+	EVP_PKEY_set_utf8_string_param(pkey,
+			OSSL_PKEY_PARAM_EC_POINT_CONVERSION_FORMAT, "uncompressed");
 
 	ctx = OSSL_ENCODER_CTX_new_for_pkey(pkey, selection, "DER",
 					    "type-specific", NULL);