replace macros with functions
[openssl.git] / apps / dgst.c
index c13535f3b21f59f4fc12ed8944c7b2ed9c10108d..55ba869c696fc76802b69803c02c11f86281db1e 100644 (file)
@@ -180,6 +180,7 @@ int MAIN(int argc, char **argv)
                        {
                        if (--argc < 1) break;
                        engine= *(++argv);
+                       e = setup_engine(bio_err, engine, 0);
                        }
 #endif
                else if (strcmp(*argv,"-hex") == 0)
@@ -223,45 +224,47 @@ int MAIN(int argc, char **argv)
                BIO_printf(bio_err,"-engine e       use engine e, possibly a hardware device.\n");
 #endif
 
-               BIO_printf(bio_err,"-%3s to use the %s message digest algorithm (default)\n",
+               BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm (default)\n",
                        LN_md5,LN_md5);
-               BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n",
+               BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm\n",
                        LN_md4,LN_md4);
-               BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n",
+               BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm\n",
                        LN_md2,LN_md2);
 #ifndef OPENSSL_NO_SHA
-               BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n",
+               BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm\n",
                        LN_sha1,LN_sha1);
-               BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n",
-                       LN_sha,LN_sha);
 #ifndef OPENSSL_NO_SHA256
-               BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n",
+               BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm\n",
+                       LN_sha224,LN_sha224);
+               BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm\n",
                        LN_sha256,LN_sha256);
 #endif
 #ifndef OPENSSL_NO_SHA512
-               BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n",
+               BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm\n",
+                       LN_sha384,LN_sha384);
+               BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm\n",
                        LN_sha512,LN_sha512);
 #endif
 #endif
-               BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n",
+               BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm\n",
                        LN_mdc2,LN_mdc2);
-               BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n",
+               BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm\n",
                        LN_ripemd160,LN_ripemd160);
+#ifndef OPENSSL_NO_WHIRLPOOL
+               BIO_printf(bio_err,"-%-14s to use the %s message digest algorithm\n",
+                       SN_whirlpool,SN_whirlpool);
+#endif
                err=1;
                goto end;
                }
 
-#ifndef OPENSSL_NO_ENGINE
-        e = setup_engine(bio_err, engine, 0);
-#endif
-
        in=BIO_new(BIO_s_file());
        bmd=BIO_new(BIO_f_md());
        if (debug)
                {
                BIO_set_callback(in,BIO_debug_callback);
                /* needed for windows 3.1 */
-               BIO_set_callback_arg(in,bio_err);
+               BIO_set_callback_arg(in,(char *)bio_err);
                }
 
        if(!app_passwd(bio_err, passargin, NULL, &passin, NULL))