Use default digest implementation in dgst.c
authorDr. Stephen Henson <steve@openssl.org>
Thu, 23 Jan 2014 18:36:33 +0000 (18:36 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Thu, 23 Jan 2014 18:38:51 +0000 (18:38 +0000)
Use default instead of ENGINE version of digest. Without this
errors will occur if you use an ENGINE for a private key and
it doesn't implement the digest in question.
(cherry picked from commit 4eedf86a163284478140c46edb7b462d33898c93)

apps/dgst.c

index 9bf38ce73b7ee9110fee01ea264febb7fbf2104e..ec6621b05d04f178a897dc774ef4414167fc3588 100644 (file)
@@ -415,9 +415,9 @@ int MAIN(int argc, char **argv)
                        goto end;
                        }
                if (do_verify)
-                       r = EVP_DigestVerifyInit(mctx, &pctx, md, e, sigkey);
+                       r = EVP_DigestVerifyInit(mctx, &pctx, md, NULL, sigkey);
                else
-                       r = EVP_DigestSignInit(mctx, &pctx, md, e, sigkey);
+                       r = EVP_DigestSignInit(mctx, &pctx, md, NULL, sigkey);
                if (!r)
                        {
                        BIO_printf(bio_err, "Error setting context\n");