/* ctx == provctx */
if ((dh = dh_new(ctx)) != NULL
- && dh_import(dh, OSSL_KEYMGMT_SELECT_ALL_PARAMETERS, params)
+ && dh_import(dh, OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS, params)
&& dh_param_der(ctx, dh, out, cb, cbarg))
ok = 1;
dh_free(dh);
/* ctx == provctx */
if ((dh = dh_new(ctx)) != NULL
- && dh_import(dh, OSSL_KEYMGMT_SELECT_ALL_PARAMETERS, params)
+ && dh_import(dh, OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS, params)
&& dh_param_pem(ctx, dh, out, cb, cbarg))
ok = 1;
dh_free(dh);
/* ctx == provctx */
if ((dh = dh_new(ctx)) != NULL
- && dh_import(dh, OSSL_KEYMGMT_SELECT_ALL_PARAMETERS, params)
+ && dh_import(dh, OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS, params)
&& dh_param_print(ctx, dh, out, cb, cbarg))
ok = 1;
dh_free(dh);
#include "prov/provider_ctx.h"
#include "encoder_local.h"
+#define DH_SELECT_PRIVATE_IMPORTABLE \
+ (OSSL_KEYMGMT_SELECT_KEYPAIR | OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS)
+
static OSSL_FUNC_encoder_newctx_fn dh_priv_newctx;
static OSSL_FUNC_encoder_freectx_fn dh_priv_freectx;
static OSSL_FUNC_encoder_set_ctx_params_fn dh_priv_set_ctx_params;
DH *dh;
if ((dh = dh_new(ctx->provctx)) != NULL
- && dh_import(dh, OSSL_KEYMGMT_SELECT_KEYPAIR, params)
+ && dh_import(dh, DH_SELECT_PRIVATE_IMPORTABLE, params)
&& dh_priv_der(ctx, dh, out, cb, cbarg))
ok = 1;
dh_free(dh);
DH *dh;
if ((dh = dh_new(ctx->provctx)) != NULL
- && dh_import(dh, OSSL_KEYMGMT_SELECT_KEYPAIR, params)
+ && dh_import(dh, DH_SELECT_PRIVATE_IMPORTABLE, params)
&& dh_pem_priv(ctx->provctx, dh, out, cb, cbarg))
ok = 1;
dh_free(dh);
DH *dh;
if ((dh = dh_new(ctx->provctx)) != NULL
- && dh_import(dh, OSSL_KEYMGMT_SELECT_KEYPAIR, params)
+ && dh_import(dh, DH_SELECT_PRIVATE_IMPORTABLE, params)
&& dh_priv_print(ctx, dh, out, cb, cbarg))
ok = 1;
dh_free(dh);
static OSSL_FUNC_encoder_encode_data_fn dh_pub_print_data;
static OSSL_FUNC_encoder_encode_object_fn dh_pub_print;
+#define DH_SELECT_PUBLIC_IMPORTABLE \
+ (OSSL_KEYMGMT_SELECT_PUBLIC_KEY | OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS)
+
/* Public key : context */
/*
/* ctx == provctx */
if ((dh = dh_new(ctx)) != NULL
- && dh_import(dh, OSSL_KEYMGMT_SELECT_KEYPAIR, params)
+ && dh_import(dh, DH_SELECT_PUBLIC_IMPORTABLE, params)
&& dh_pub_der(ctx, dh, out, cb, cbarg))
ok = 1;
dh_free(dh);
/* ctx == provctx */
if ((dh = dh_new(ctx)) != NULL
- && dh_import(dh, OSSL_KEYMGMT_SELECT_KEYPAIR, params)
+ && dh_import(dh, DH_SELECT_PUBLIC_IMPORTABLE, params)
&& dh_pub_pem(ctx, dh, out, cb, cbarg))
ok = 1;
dh_free(dh);
/* ctx == provctx */
if ((dh = dh_new(ctx)) != NULL
- && dh_import(dh, OSSL_KEYMGMT_SELECT_KEYPAIR, params)
+ && dh_import(dh, DH_SELECT_PUBLIC_IMPORTABLE, params)
&& dh_pub_print(ctx, dh, out, cb, cbarg))
ok = 1;
dh_free(dh);