diff options
author | naddy <> | 2019-01-18 23:33:57 +0000 |
---|---|---|
committer | naddy <> | 2019-01-18 23:33:57 +0000 |
commit | f11f1c0f8ad579cfb88a2559e3efe0e0367cec85 (patch) | |
tree | fe412cc1dc7ce784d70d5bfa12a3db6f4779e768 /src/usr.bin | |
parent | d1f6c1115b07fb6692e72bd950e5caca40fd7d33 (diff) | |
download | openbsd-f11f1c0f8ad579cfb88a2559e3efe0e0367cec85.tar.gz openbsd-f11f1c0f8ad579cfb88a2559e3efe0e0367cec85.tar.bz2 openbsd-f11f1c0f8ad579cfb88a2559e3efe0e0367cec85.zip |
switch the default algorithm for the dgst command from MD5 to SHA256
ok deraadt@
Diffstat (limited to 'src/usr.bin')
-rw-r--r-- | src/usr.bin/openssl/dgst.c | 4 | ||||
-rw-r--r-- | src/usr.bin/openssl/openssl.1 | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/usr.bin/openssl/dgst.c b/src/usr.bin/openssl/dgst.c index 0bd8d66fc8..5456a6c701 100644 --- a/src/usr.bin/openssl/dgst.c +++ b/src/usr.bin/openssl/dgst.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dgst.c,v 1.12 2018/02/07 05:47:55 jsing Exp $ */ | 1 | /* $OpenBSD: dgst.c,v 1.13 2019/01/18 23:33:57 naddy Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -373,7 +373,7 @@ mac_end: | |||
373 | /* we use md as a filter, reading from 'in' */ | 373 | /* we use md as a filter, reading from 'in' */ |
374 | else { | 374 | else { |
375 | if (md == NULL) | 375 | if (md == NULL) |
376 | md = EVP_md5(); | 376 | md = EVP_sha256(); |
377 | if (!BIO_set_md(bmd, md)) { | 377 | if (!BIO_set_md(bmd, md)) { |
378 | BIO_printf(bio_err, "Error setting digest %s\n", pname); | 378 | BIO_printf(bio_err, "Error setting digest %s\n", pname); |
379 | ERR_print_errors(bio_err); | 379 | ERR_print_errors(bio_err); |
diff --git a/src/usr.bin/openssl/openssl.1 b/src/usr.bin/openssl/openssl.1 index 1a116c4477..5c3b61b275 100644 --- a/src/usr.bin/openssl/openssl.1 +++ b/src/usr.bin/openssl/openssl.1 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: openssl.1,v 1.97 2019/01/18 07:11:51 jmc Exp $ | 1 | .\" $OpenBSD: openssl.1,v 1.98 2019/01/18 23:33:57 naddy Exp $ |
2 | .\" ==================================================================== | 2 | .\" ==================================================================== |
3 | .\" Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. | 3 | .\" Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. |
4 | .\" | 4 | .\" |
@@ -1010,16 +1010,16 @@ Print BIO debugging information. | |||
1010 | .It Fl Ar digest | 1010 | .It Fl Ar digest |
1011 | Use the specified message | 1011 | Use the specified message |
1012 | .Ar digest . | 1012 | .Ar digest . |
1013 | The default is MD5. | 1013 | The default is SHA256. |
1014 | The available digests can be displayed using | 1014 | The available digests can be displayed using |
1015 | .Nm openssl | 1015 | .Nm openssl |
1016 | .Cm list-message-digest-commands . | 1016 | .Cm list-message-digest-commands . |
1017 | The following are equivalent: | 1017 | The following are equivalent: |
1018 | .Nm openssl dgst | 1018 | .Nm openssl dgst |
1019 | .Fl md5 | 1019 | .Fl sha256 |
1020 | and | 1020 | and |
1021 | .Nm openssl | 1021 | .Nm openssl |
1022 | .Cm md5 . | 1022 | .Cm sha256 . |
1023 | .It Fl hex | 1023 | .It Fl hex |
1024 | Digest is to be output as a hex dump. | 1024 | Digest is to be output as a hex dump. |
1025 | This is the default case for a | 1025 | This is the default case for a |