Add encoded point ctrl support for other curves: this makes it possible
to handle X25519 and other EC curve point encoding in a similar way
for TLS.
Reviewed-by: Rich Salz <rsalz@openssl.org>
*(int *)arg2 = NID_sha256;
return 2;
+ case ASN1_PKEY_CTRL_SET1_TLS_ENCPT:
+ return EC_KEY_oct2key(EVP_PKEY_get0_EC_KEY(pkey), arg2, arg1, NULL);
+
+ case ASN1_PKEY_CTRL_GET1_TLS_ENCPT:
+ return EC_KEY_key2buf(EVP_PKEY_get0_EC_KEY(pkey),
+ POINT_CONVERSION_UNCOMPRESSED, arg2, NULL);
+
default:
return -2;