Fix ECX serializer import calls to use correct selection flags.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/12698)
This commit is contained in:
Shane Lontis 2020-08-21 11:15:59 +10:00
parent d9cdfda24f
commit 458cb85d19

View File

@ -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);