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 9a6dc0d..a93ea4d 100644 (file)
@@ -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);
 
index 27c1662..80cc4f0 100644 (file)
@@ -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;
        }
 
index e68eafd..985b0a9 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_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. */