From 6f88c6a634868a97d9613d6ec3663bf83a05d379 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Thu, 1 Jun 2006 12:38:22 +0000 Subject: [PATCH] Add missing prototype. Extend engine utility to print public key algorithms. --- apps/engine.c | 10 ++++++++++ crypto/engine/eng_fat.c | 1 + crypto/engine/engine.h | 1 + 3 files changed, 12 insertions(+) diff --git a/apps/engine.c b/apps/engine.c index 9a6dc0d822..a93ea4de3c 100644 --- a/apps/engine.c +++ b/apps/engine.c @@ -449,6 +449,7 @@ skip_arg_loop: const int *nids; ENGINE_CIPHERS_PTR fn_c; ENGINE_DIGESTS_PTR fn_d; + ENGINE_PKEY_METHS_PTR fn_pk; if (ENGINE_get_RSA(e) != NULL && !append_buf(&cap_buf, "RSA", @@ -487,6 +488,15 @@ skip_ciphers: goto end; skip_digests: + fn_pk = ENGINE_get_pkey_meths(e); + if(!fn_pk) goto skip_pmeths; + n = fn_pk(e, NULL, &nids, 0); + for(k=0 ; k < n ; ++k) + if(!append_buf(&cap_buf, + OBJ_nid2sn(nids[k]), + &cap_size, 256)) + goto end; +skip_pmeths: if (cap_buf && (*cap_buf != '\0')) BIO_printf(bio_out, " [%s]\n", cap_buf); diff --git a/crypto/engine/eng_fat.c b/crypto/engine/eng_fat.c index 27c1662f62..80cc4f0073 100644 --- a/crypto/engine/eng_fat.c +++ b/crypto/engine/eng_fat.c @@ -154,6 +154,7 @@ int ENGINE_register_complete(ENGINE *e) ENGINE_register_ECDSA(e); #endif ENGINE_register_RAND(e); + ENGINE_register_pkey_meths(e); return 1; } diff --git a/crypto/engine/engine.h b/crypto/engine/engine.h index e68eafd66f..985b0a9f49 100644 --- a/crypto/engine/engine.h +++ b/crypto/engine/engine.h @@ -465,6 +465,7 @@ int ENGINE_set_load_privkey_function(ENGINE *e, ENGINE_LOAD_KEY_PTR loadpriv_f); int ENGINE_set_load_pubkey_function(ENGINE *e, ENGINE_LOAD_KEY_PTR loadpub_f); int ENGINE_set_ciphers(ENGINE *e, ENGINE_CIPHERS_PTR f); int ENGINE_set_digests(ENGINE *e, ENGINE_DIGESTS_PTR f); +int ENGINE_set_pkey_meths(ENGINE *e, ENGINE_PKEY_METHS_PTR f); int ENGINE_set_flags(ENGINE *e, int flags); int ENGINE_set_cmd_defns(ENGINE *e, const ENGINE_CMD_DEFN *defns); /* These functions allow control over any per-structure ENGINE data. */ -- 2.25.1