diff options
author | Geoff Thorpe <geoff@openssl.org> | 2001-10-01 15:41:31 +0000 |
---|---|---|
committer | Geoff Thorpe <geoff@openssl.org> | 2001-10-01 15:41:31 +0000 |
commit | 4ba163cbf98a0549c4ae01dd5b880341cdbb12e0 (patch) | |
tree | 489f384f7274c975397da4ec82780a111ec75363 /apps | |
parent | 2bfb2398e387ed4b5c556521459ebd9bd6e81e62 (diff) |
Make "openssl engine -c" list any supported digests as well as supported
ciphers.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/engine.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/apps/engine.c b/apps/engine.c index e64ed53e95..8a04fbcd64 100644 --- a/apps/engine.c +++ b/apps/engine.c @@ -432,7 +432,8 @@ skip_arg_loop: char *cap_buf = NULL; int k,n; const int *nids; - ENGINE_CIPHERS_PTR fn; + ENGINE_CIPHERS_PTR fn_c; + ENGINE_DIGESTS_PTR fn_d; if (ENGINE_get_RSA(e) != NULL && !append_buf(&cap_buf, "RSA", @@ -451,9 +452,9 @@ skip_arg_loop: &cap_size, 256)) goto end; - fn = ENGINE_get_ciphers(e); - if(!fn) goto skip_ciphers; - n = fn(e, NULL, &nids, 0); + fn_c = ENGINE_get_ciphers(e); + if(!fn_c) goto skip_ciphers; + n = fn_c(e, NULL, &nids, 0); for(k=0 ; k < n ; ++k) if(!append_buf(&cap_buf, OBJ_nid2sn(nids[k]), @@ -461,6 +462,16 @@ skip_arg_loop: goto end; skip_ciphers: + fn_d = ENGINE_get_digests(e); + if(!fn_d) goto skip_digests; + n = fn_d(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_digests: if (cap_buf && (*cap_buf != '\0')) BIO_printf(bio_out, " [%s]", cap_buf); |