Add first cut symmetric crypto support.
diff --git a/apps/apps.c b/apps/apps.c index 31225b3..4d04ea2 100644 --- a/apps/apps.c +++ b/apps/apps.c
@@ -1165,7 +1165,11 @@ BIO_printf(err,"can't use that engine\n"); return NULL; } + + ENGINE_load_engine_ciphers(e); + BIO_printf(err,"engine \"%s\" set.\n", engine); + /* Free our "structural" reference. */ ENGINE_free(e); }
diff --git a/apps/engine.c b/apps/engine.c index 1308b6b..1b2fc50 100644 --- a/apps/engine.c +++ b/apps/engine.c
@@ -94,7 +94,7 @@ return; } -static int append_buf(char **buf, char *s, int *size, int step) +static int append_buf(char **buf, const char *s, int *size, int step) { int l = strlen(s); @@ -430,6 +430,7 @@ { int cap_size = 256; char *cap_buf = NULL; + int k,n; if (ENGINE_get_RSA(e) != NULL && !append_buf(&cap_buf, "RSA", @@ -448,6 +449,13 @@ &cap_size, 256)) goto end; + n=ENGINE_cipher_num(e); + for(k=0 ; k < n ; ++k) + if(!append_buf(&cap_buf, + OBJ_nid2sn(ENGINE_get_cipher(e, k)->nid), + &cap_size, 256)) + goto end; + if (cap_buf && (*cap_buf != '\0')) BIO_printf(bio_out, " [%s]", cap_buf);