diff options
author | Rich Salz <rsalz@akamai.com> | 2015-06-13 17:03:39 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-12-11 11:59:59 -0500 |
commit | f8547f62c212837dbf44fb7e2755e5774a59a57b (patch) | |
tree | ddb5464c4a245625c57a1176a2aa2e7fe1b4f563 /apps | |
parent | 6ebe8dac3e6101c00b973ec8abc3cf405c9070d5 (diff) |
Use SHA256 not MD5 as default digest.
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/ca.c | 2 | ||||
-rw-r--r-- | apps/dgst.c | 2 | ||||
-rw-r--r-- | apps/enc.c | 2 |
3 files changed, 3 insertions, 3 deletions
@@ -1420,7 +1420,7 @@ static int certify_cert(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509, } else BIO_printf(bio_err, "Signature ok\n"); - if ((rreq = X509_to_X509_REQ(req, NULL, EVP_md5())) == NULL) + if ((rreq = X509_to_X509_REQ(req, NULL, NULL)) == NULL) goto end; ok = do_body(xret, pkey, x509, dgst, sigopts, policy, db, serial, subj, diff --git a/apps/dgst.c b/apps/dgst.c index e62a8de413..fb09a45cd0 100644 --- a/apps/dgst.c +++ b/apps/dgst.c @@ -375,7 +375,7 @@ int dgst_main(int argc, char **argv) goto end; } if (md == NULL) - md = EVP_md5(); + md = EVP_sha256(); if (!EVP_DigestInit_ex(mctx, md, impl)) { BIO_printf(bio_err, "Error setting digest\n"); ERR_print_errors(bio_err); diff --git a/apps/enc.c b/apps/enc.c index b0c82d6a34..cf021856e1 100644 --- a/apps/enc.c +++ b/apps/enc.c @@ -306,7 +306,7 @@ int enc_main(int argc, char **argv) } if (dgst == NULL) - dgst = EVP_md5(); + dgst = EVP_sha256(); /* It must be large enough for a base64 encoded line */ if (base64 && bsize < 80) |