Zap obsolete der_chop script.
[openssl.git] / apps / dgst.c
index be25dafef7047a5e445e37154bd9afd753961f1a..30253149114186123e8159b811248a7d7bdc527f 100644 (file)
@@ -222,10 +222,20 @@ int MAIN(int argc, char **argv)
                        LN_md4,LN_md4);
                BIO_printf(bio_err,"-%3s 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",
                        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",
+                       LN_sha256,LN_sha256);
+#endif
+#ifndef OPENSSL_NO_SHA512
+               BIO_printf(bio_err,"-%3s 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",
                        LN_mdc2,LN_mdc2);
                BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n",
@@ -322,7 +332,13 @@ int MAIN(int argc, char **argv)
 
 
        /* we use md as a filter, reading from 'in' */
-       BIO_set_md(bmd,md);
+       if (!BIO_set_md(bmd,md))
+               {
+               BIO_printf(bio_err, "Error setting digest %s\n", pname);
+               ERR_print_errors(bio_err);
+               goto end;
+               }
+               
        inp=BIO_push(bmd,in);
 
        if (argc == 0)