Submitted by:
authorBodo Möller <bodo@openssl.org>
Sun, 11 Apr 1999 02:49:35 +0000 (02:49 +0000)
committerBodo Möller <bodo@openssl.org>
Sun, 11 Apr 1999 02:49:35 +0000 (02:49 +0000)
Reviewed by:
PR:

CHANGES
apps/openssl.c
test/testenc

diff --git a/CHANGES b/CHANGES
index 66e267306c783ab751a5233575fbf7d71f879f28..163281cd36373ecd3e9f019ce7f80b912698ca56 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -5,6 +5,14 @@
 
  Changes between 0.9.2b and 0.9.3
 
+  *) Bugfix: In test/testenc, don't test "openssl <cipher>" for
+     ciphers that were excluded, e.g. by -DNO_IDEA.  Also, test
+     all available cipers including rc5, which was forgotten until now.
+     In order to let the testing shell script know which algorithms
+     are available, a new (up to now undocumented) command
+     "openssl list-cipher-commands" is used.
+     [Bodo Moeller]
+
   *) Bugfix: s_client occasionally would sleep in select() when
      it should have checked SSL_pending() first.
      [Bodo Moeller]
index dfa23d674e4ed157f5ab0bb578f06958b4ef6884..dd22aa78af3b2138d6a986922b8cbad3a17cbfb5 100644 (file)
@@ -254,6 +254,10 @@ end:
        EXIT(ret);
        }
 
+#define LIST_STANDARD_COMMANDS "list-standard-commands"
+#define LIST_MESSAGE_DIGEST_COMMANDS "list-message-digest-commands"
+#define LIST_CIPHER_COMMANDS "list-cipher-commands"
+
 static int do_cmd(prog,argc,argv)
 LHASH *prog;
 int argc;
@@ -278,6 +282,28 @@ char *argv[];
                ret= -1;
                goto end;
                }
+       else if ((strcmp(argv[0],LIST_STANDARD_COMMANDS) == 0) ||
+               (strcmp(argv[0],LIST_MESSAGE_DIGEST_COMMANDS) == 0) ||
+               (strcmp(argv[0],LIST_CIPHER_COMMANDS) == 0))
+               {
+               int list_type;
+               BIO *bio_stdout;
+
+               if (strcmp(argv[0],LIST_STANDARD_COMMANDS) == 0)
+                       list_type = FUNC_TYPE_GENERAL;
+               else if (strcmp(argv[0],LIST_MESSAGE_DIGEST_COMMANDS) == 0)
+                       list_type = FUNC_TYPE_MD;
+               else /* strcmp(argv[0],LIST_CIPHER_COMMANDS) == 0 */
+                       list_type = FUNC_TYPE_CIPHER;
+               bio_stdout = BIO_new_fp(stdout,BIO_NOCLOSE);
+               
+               for (fp=functions; fp->name != NULL; fp++)
+                       if (fp->type == list_type)
+                               BIO_printf(bio_stdout, "%s\n", fp->name);
+               BIO_free(bio_stdout);
+               ret=0;
+               goto end;
+               }
        else
                {
                BIO_printf(bio_err,"openssl:Error: '%s' is an invalid command.\n",
index f69ca37fc3efbdb3912fb06edafc2214c67ea1b2..0656c7f5254068fe4730d974d2d6e939f77bddcd 100644 (file)
@@ -27,15 +27,7 @@ else
        /bin/rm $test.cipher $test.clear
 fi
 
-for i in rc4 \
-       des-cfb des-ede-cfb des-ede3-cfb \
-       des-ofb des-ede-ofb des-ede3-ofb \
-       des-ecb des-ede des-ede3 desx \
-       des-cbc des-ede-cbc des-ede3-cbc \
-       idea-ecb idea-cfb idea-ofb idea-cbc \
-       rc2-ecb rc2-cfb rc2-ofb rc2-cbc \
-       bf-ecb bf-cfb bf-ofb bf-cbc rc4 \
-       cast5-ecb cast5-cfb cast5-ofb cast5-cbc
+for i in `$cmd list-cipher-commands`
 do
        echo $i
        $cmd $i -bufsize 113 -e -k test < $test > $test.$i.cipher