diff options
author | Geoff Thorpe <geoff@openssl.org> | 2001-09-25 21:45:03 +0000 |
---|---|---|
committer | Geoff Thorpe <geoff@openssl.org> | 2001-09-25 21:45:03 +0000 |
commit | 0b4b9a11f54539ec65804563f72c4feac922f5f2 (patch) | |
tree | b909ffd6e4e8eb3996a5ead60d98c070960f9204 | |
parent | d7e0299792e4ddb7506ee86db62d8e1db332a1e9 (diff) |
Put the cipher info back into the "openssl engine" command.
-rw-r--r-- | apps/engine.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/apps/engine.c b/apps/engine.c index ebaeeabf21..e64ed53e95 100644 --- a/apps/engine.c +++ b/apps/engine.c @@ -430,9 +430,9 @@ skip_arg_loop: { int cap_size = 256; char *cap_buf = NULL; -#if 0 /* Awaiting EVP_[CIPHER|DIGEST] refit */ int k,n; -#endif + const int *nids; + ENGINE_CIPHERS_PTR fn; if (ENGINE_get_RSA(e) != NULL && !append_buf(&cap_buf, "RSA", @@ -451,15 +451,16 @@ skip_arg_loop: &cap_size, 256)) goto end; -#if 0 - n=ENGINE_cipher_num(e); + fn = ENGINE_get_ciphers(e); + if(!fn) goto skip_ciphers; + n = fn(e, NULL, &nids, 0); for(k=0 ; k < n ; ++k) if(!append_buf(&cap_buf, - OBJ_nid2sn(ENGINE_get_cipher(e, k)->nid), + OBJ_nid2sn(nids[k]), &cap_size, 256)) goto end; -#endif +skip_ciphers: if (cap_buf && (*cap_buf != '\0')) BIO_printf(bio_out, " [%s]", cap_buf); |