Add missing prototype. Extend engine utility to print public key algorithms.
authorDr. Stephen Henson <steve@openssl.org>
Thu, 1 Jun 2006 12:38:22 +0000 (12:38 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Thu, 1 Jun 2006 12:38:22 +0000 (12:38 +0000)
apps/engine.c
crypto/engine/eng_fat.c
crypto/engine/engine.h

index 9a6dc0d822a9fb9ef9ca48f62e0400675a2befcf..a93ea4de3c6bf3053e14034abf9edd646c7f842e 100644 (file)
@@ -449,6 +449,7 @@ skip_arg_loop:
                                const int *nids;
                                ENGINE_CIPHERS_PTR fn_c;
                                ENGINE_DIGESTS_PTR fn_d;
                                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",
 
                                if (ENGINE_get_RSA(e) != NULL
                                        && !append_buf(&cap_buf, "RSA",
@@ -487,6 +488,15 @@ skip_ciphers:
                                                goto end;
 
 skip_digests:
                                                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);
 
                                if (cap_buf && (*cap_buf != '\0'))
                                        BIO_printf(bio_out, " [%s]\n", cap_buf);
 
index 27c1662f6254d96986b25da8079b45db1341059d..80cc4f0073a1a71044b10a5048e7d3590ec1a1f0 100644 (file)
@@ -154,6 +154,7 @@ int ENGINE_register_complete(ENGINE *e)
        ENGINE_register_ECDSA(e);
 #endif
        ENGINE_register_RAND(e);
        ENGINE_register_ECDSA(e);
 #endif
        ENGINE_register_RAND(e);
+       ENGINE_register_pkey_meths(e);
        return 1;
        }
 
        return 1;
        }
 
index e68eafd66f7481bd372ac2a52941d1facb89fc2c..985b0a9f491e530146b61e3e87bdd62648315d9d 100644 (file)
@@ -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_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. */
 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. */