diff options
Diffstat (limited to 'crypto/evp/keymgmt_meth.c')
-rw-r--r-- | crypto/evp/keymgmt_meth.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/crypto/evp/keymgmt_meth.c b/crypto/evp/keymgmt_meth.c index 0d7b543..f7603f3 100644 --- a/crypto/evp/keymgmt_meth.c +++ b/crypto/evp/keymgmt_meth.c @@ -32,10 +32,11 @@ static void *keymgmt_new(void) return keymgmt; } -static void *keymgmt_from_dispatch(int name_id, - const OSSL_DISPATCH *fns, - OSSL_PROVIDER *prov) +static void *keymgmt_from_algorithm(int name_id, + const OSSL_ALGORITHM *algodef, + OSSL_PROVIDER *prov) { + const OSSL_DISPATCH *fns = algodef->implementation; EVP_KEYMGMT *keymgmt = NULL; int setparamfncnt = 0, getparamfncnt = 0; int setgenparamfncnt = 0; @@ -46,6 +47,7 @@ static void *keymgmt_from_dispatch(int name_id, return NULL; } keymgmt->name_id = name_id; + keymgmt->description = algodef->algorithm_description; for (; fns->function_id != 0; fns++) { switch (fns->function_id) { @@ -202,7 +204,7 @@ EVP_KEYMGMT *evp_keymgmt_fetch_by_number(OSSL_LIB_CTX *ctx, int name_id, { return evp_generic_fetch_by_number(ctx, OSSL_OP_KEYMGMT, name_id, properties, - keymgmt_from_dispatch, + keymgmt_from_algorithm, (int (*)(void *))EVP_KEYMGMT_up_ref, (void (*)(void *))EVP_KEYMGMT_free); } @@ -211,7 +213,7 @@ EVP_KEYMGMT *EVP_KEYMGMT_fetch(OSSL_LIB_CTX *ctx, const char *algorithm, const char *properties) { return evp_generic_fetch(ctx, OSSL_OP_KEYMGMT, algorithm, properties, - keymgmt_from_dispatch, + keymgmt_from_algorithm, (int (*)(void *))EVP_KEYMGMT_up_ref, (void (*)(void *))EVP_KEYMGMT_free); } @@ -265,7 +267,7 @@ void EVP_KEYMGMT_do_all_provided(OSSL_LIB_CTX *libctx, { evp_generic_do_all(libctx, OSSL_OP_KEYMGMT, (void (*)(void *, void *))fn, arg, - keymgmt_from_dispatch, + keymgmt_from_algorithm, (void (*)(void *))EVP_KEYMGMT_free); } |