Make "run" volatile
[openssl.git] / apps / dgst.c
index d471dbdabda49e244f5ad13be5a059731fb46b44..9f6954f26542cb409ce75fceac145374e3f0022b 100644 (file)
@@ -276,6 +276,8 @@ int MAIN(int argc, char **argv)
                BIO_printf(bio_err,"-d              to output debug info\n");
                BIO_printf(bio_err,"-hex            output as hex dump\n");
                BIO_printf(bio_err,"-binary         output in binary form\n");
+               BIO_printf(bio_err,"-hmac arg       set the HMAC key to arg\n");
+               BIO_printf(bio_err,"-non-fips-allow allow use of non FIPS digest\n");
                BIO_printf(bio_err,"-sign   file    sign digest using private key in file\n");
                BIO_printf(bio_err,"-verify file    verify a signature using public key in file\n");
                BIO_printf(bio_err,"-prverify file  verify a signature using private key in file\n");
@@ -529,7 +531,8 @@ int MAIN(int argc, char **argv)
                                        EVP_PKEY_asn1_get0_info(NULL, NULL,
                                                NULL, NULL, &sig_name, ameth);
                                }
-                       md_name = EVP_MD_name(md);
+                       if (md)
+                               md_name = EVP_MD_name(md);
                        }
                err = 0;
                for (i=0; i<argc; i++)
@@ -641,7 +644,12 @@ int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
        else 
                {
                if (sig_name)
-                       BIO_printf(out, "%s-%s(%s)= ", sig_name, md_name, file);
+                       {
+                       BIO_puts(out, sig_name);
+                       if (md_name)
+                               BIO_printf(out, "-%s", md_name);
+                       BIO_printf(out, "(%s)= ", file);
+                       }
                else if (md_name)
                        BIO_printf(out, "%s(%s)= ", md_name, file);
                else