diff --git a/providers/implementations/encode_decode/encoder_ecx_pub.c b/providers/implementations/encode_decode/encoder_ecx_pub.c index 6f082c2b4c..a4350d84cf 100644 --- a/providers/implementations/encode_decode/encoder_ecx_pub.c +++ b/providers/implementations/encode_decode/encoder_ecx_pub.c @@ -93,7 +93,7 @@ static int ecx_pub_der_data(void *vctx, const OSSL_PARAM params[], ECX_KEY *ecxkey; if ((ecxkey = ecx_new(ctx->provctx)) != NULL - && ecx_import(ecxkey, OSSL_KEYMGMT_SELECT_KEYPAIR, params) + && ecx_import(ecxkey, OSSL_KEYMGMT_SELECT_PUBLIC_KEY, params) && ecx_pub_der(ctx, ecxkey, out, cb, cbarg)) ok = 1; ecx_free(ecxkey); @@ -137,7 +137,7 @@ static int ecx_pub_pem_data(void *vctx, const OSSL_PARAM params[], ECX_KEY *ecxkey; if ((ecxkey = ecx_new(ctx->provctx)) != NULL - && ecx_import(ecxkey, OSSL_KEYMGMT_SELECT_KEYPAIR, params) + && ecx_import(ecxkey, OSSL_KEYMGMT_SELECT_PUBLIC_KEY, params) && ecx_pub_pem(ctx, ecxkey, out, cb, cbarg)) ok = 1; ecx_free(ecxkey); @@ -180,7 +180,7 @@ static int ecx_pub_print_data(void *vctx, const OSSL_PARAM params[], ECX_KEY *ecxkey; if ((ecxkey = ecx_new(ctx)) != NULL - && ecx_import(ecxkey, OSSL_KEYMGMT_SELECT_KEYPAIR, params) + && ecx_import(ecxkey, OSSL_KEYMGMT_SELECT_PUBLIC_KEY, params) && ecx_pub_print(ctx, ecxkey, out, cb, cbarg)) ok = 1; ecx_free(ecxkey);