Further synchronisation with Unix build. I hadn't noticed pq_compat.h
[openssl.git] / apps / engine.c
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;
+                               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);