summaryrefslogtreecommitdiff
path: root/src/usr.bin/openssl
diff options
context:
space:
mode:
authordoug <>2015-09-13 23:36:21 +0000
committerdoug <>2015-09-13 23:36:21 +0000
commit5e0ea5055e21b1f3526587a5a17702ab3fee3e49 (patch)
tree804e21f7971977c17340feffa6cc8840e09b3cfe /src/usr.bin/openssl
parentc221c5094439136f46f34e398f2908ca9b5bfb1d (diff)
downloadopenbsd-5e0ea5055e21b1f3526587a5a17702ab3fee3e49.tar.gz
openbsd-5e0ea5055e21b1f3526587a5a17702ab3fee3e49.tar.bz2
openbsd-5e0ea5055e21b1f3526587a5a17702ab3fee3e49.zip
Remove MD4 support from LibreSSL.
MD4 should have been removed a long time ago. Also, RFC 6150 moved it to historic in 2011. Rides the major crank from removing SHA-0. Discussed with many including beck@, millert@, djm@, sthen@ ok jsing@, input + ok bcook@
Diffstat (limited to 'src/usr.bin/openssl')
-rw-r--r--src/usr.bin/openssl/openssl.115
-rw-r--r--src/usr.bin/openssl/openssl.c5
-rw-r--r--src/usr.bin/openssl/req.c4
-rw-r--r--src/usr.bin/openssl/speed.c35
-rw-r--r--src/usr.bin/openssl/ts.c4
5 files changed, 15 insertions, 48 deletions
diff --git a/src/usr.bin/openssl/openssl.1 b/src/usr.bin/openssl/openssl.1
index 50063b653d..de0a56735a 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.26 2015/09/13 17:57:11 jmc Exp $ 1.\" $OpenBSD: openssl.1,v 1.27 2015/09/13 23:36:21 doug 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.\"
@@ -383,8 +383,6 @@ Streebog-256 digest.
383Streebog-512 digest. 383Streebog-512 digest.
384.It Cm md_gost94 384.It Cm md_gost94
385GOST R 34.11-94 digest. 385GOST R 34.11-94 digest.
386.It Cm md4
387MD4 digest.
388.It Cm md5 386.It Cm md5
389MD5 digest. 387MD5 digest.
390.It Cm ripemd160 388.It Cm ripemd160
@@ -1795,7 +1793,7 @@ install user certificates and CAs in MSIE using the Xenroll control.
1795.Bk -words 1793.Bk -words
1796.Oo 1794.Oo
1797.Fl gost-mac | streebog256 | streebog512 | md_gost94 | 1795.Fl gost-mac | streebog256 | streebog512 | md_gost94 |
1798.Fl md4 | md5 | ripemd160 | sha | sha1 | 1796.Fl md5 | ripemd160 | sha1 |
1799.Fl sha224 | sha256 | sha384 | sha512 | whirlpool 1797.Fl sha224 | sha256 | sha384 | sha512 | whirlpool
1800.Oc 1798.Oc
1801.Op Fl binary 1799.Op Fl binary
@@ -1818,7 +1816,7 @@ install user certificates and CAs in MSIE using the Xenroll control.
1818.Pp 1816.Pp
1819.Nm openssl 1817.Nm openssl
1820.Cm gost-mac | streebog256 | streebog512 | md_gost94 | 1818.Cm gost-mac | streebog256 | streebog512 | md_gost94 |
1821.Cm md4 | md5 | ripemd160 | sha | sha1 | 1819.Cm md5 | ripemd160 | sha | sha1 |
1822.Cm sha224 | sha256 | sha384 | sha512 | whirlpool 1820.Cm sha224 | sha256 | sha384 | sha512 | whirlpool
1823.Op Fl c 1821.Op Fl c
1824.Op Fl d 1822.Op Fl d
@@ -5085,7 +5083,7 @@ instead of standard output.
5085.Op Fl key Ar keyfile 5083.Op Fl key Ar keyfile
5086.Op Fl keyform Ar DER | PEM 5084.Op Fl keyform Ar DER | PEM
5087.Op Fl keyout Ar file 5085.Op Fl keyout Ar file
5088.Op Fl md4 | md5 | sha1 5086.Op Fl md5 | sha1
5089.Op Fl modulus 5087.Op Fl modulus
5090.Op Fl nameopt Ar option 5088.Op Fl nameopt Ar option
5091.Op Fl new 5089.Op Fl new
@@ -7664,7 +7662,6 @@ command were first added in
7664.Op Cm dsa2048 7662.Op Cm dsa2048
7665.Op Cm hmac 7663.Op Cm hmac
7666.Op Cm md2 7664.Op Cm md2
7667.Op Cm md4
7668.Op Cm md5 7665.Op Cm md5
7669.Op Cm rc2 7666.Op Cm rc2
7670.Op Cm rc2-cbc 7667.Op Cm rc2-cbc
@@ -7715,7 +7712,7 @@ benchmarks in parallel.
7715.Nm "openssl ts" 7712.Nm "openssl ts"
7716.Bk -words 7713.Bk -words
7717.Fl query 7714.Fl query
7718.Op Fl md4 | md5 | ripemd160 | sha | sha1 7715.Op Fl md5 | ripemd160 | sha1
7719.Op Fl cert 7716.Op Fl cert
7720.Op Fl config Ar configfile 7717.Op Fl config Ar configfile
7721.Op Fl data Ar file_to_hash 7718.Op Fl data Ar file_to_hash
@@ -7836,7 +7833,7 @@ This option specifies a previously created time stamp request in DER
7836format that will be printed into the output file. 7833format that will be printed into the output file.
7837Useful when you need to examine the content of a request in human-readable 7834Useful when you need to examine the content of a request in human-readable
7838format. 7835format.
7839.It Fl md4|md5|ripemd160|sha|sha1 7836.It Fl md5|ripemd160|sha1
7840The message digest to apply to the data file. 7837The message digest to apply to the data file.
7841It supports all the message digest algorithms that are supported by the 7838It supports all the message digest algorithms that are supported by the
7842.Nm dgst 7839.Nm dgst
diff --git a/src/usr.bin/openssl/openssl.c b/src/usr.bin/openssl/openssl.c
index d0c0ec0551..1bda338356 100644
--- a/src/usr.bin/openssl/openssl.c
+++ b/src/usr.bin/openssl/openssl.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: openssl.c,v 1.10 2015/09/13 12:41:01 bcook Exp $ */ 1/* $OpenBSD: openssl.c,v 1.11 2015/09/13 23:36:21 doug 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 *
@@ -217,9 +217,6 @@ FUNCTION functions[] = {
217 { FUNC_TYPE_MD, "streebog256", dgst_main }, 217 { FUNC_TYPE_MD, "streebog256", dgst_main },
218 { FUNC_TYPE_MD, "streebog512", dgst_main }, 218 { FUNC_TYPE_MD, "streebog512", dgst_main },
219#endif 219#endif
220#ifndef OPENSSL_NO_MD4
221 { FUNC_TYPE_MD, "md4", dgst_main },
222#endif
223#ifndef OPENSSL_NO_MD5 220#ifndef OPENSSL_NO_MD5
224 { FUNC_TYPE_MD, "md5", dgst_main }, 221 { FUNC_TYPE_MD, "md5", dgst_main },
225#endif 222#endif
diff --git a/src/usr.bin/openssl/req.c b/src/usr.bin/openssl/req.c
index 5ed658bfb1..f359e7392e 100644
--- a/src/usr.bin/openssl/req.c
+++ b/src/usr.bin/openssl/req.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: req.c,v 1.7 2015/09/11 14:30:23 bcook Exp $ */ 1/* $OpenBSD: req.c,v 1.8 2015/09/13 23:36:21 doug 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 *
@@ -354,7 +354,7 @@ bad:
354 BIO_printf(bio_err, " -newkey rsa:bits generate a new RSA key of 'bits' in size\n"); 354 BIO_printf(bio_err, " -newkey rsa:bits generate a new RSA key of 'bits' in size\n");
355 BIO_printf(bio_err, " -newkey dsa:file generate a new DSA key, parameters taken from CA in 'file'\n"); 355 BIO_printf(bio_err, " -newkey dsa:file generate a new DSA key, parameters taken from CA in 'file'\n");
356 BIO_printf(bio_err, " -newkey ec:file generate a new EC key, parameters taken from CA in 'file'\n"); 356 BIO_printf(bio_err, " -newkey ec:file generate a new EC key, parameters taken from CA in 'file'\n");
357 BIO_printf(bio_err, " -[digest] Digest to sign with (md5, sha1, md4)\n"); 357 BIO_printf(bio_err, " -[digest] Digest to sign with (md5, sha1)\n");
358 BIO_printf(bio_err, " -config file request template file.\n"); 358 BIO_printf(bio_err, " -config file request template file.\n");
359 BIO_printf(bio_err, " -subj arg set or modify request subject\n"); 359 BIO_printf(bio_err, " -subj arg set or modify request subject\n");
360 BIO_printf(bio_err, " -multivalue-rdn enable support for multivalued RDNs\n"); 360 BIO_printf(bio_err, " -multivalue-rdn enable support for multivalued RDNs\n");
diff --git a/src/usr.bin/openssl/speed.c b/src/usr.bin/openssl/speed.c
index a0fa9dcd8b..d9fe3309b7 100644
--- a/src/usr.bin/openssl/speed.c
+++ b/src/usr.bin/openssl/speed.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: speed.c,v 1.13 2015/09/12 15:49:53 bcook Exp $ */ 1/* $OpenBSD: speed.c,v 1.14 2015/09/13 23:36:21 doug 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 *
@@ -124,9 +124,6 @@
124#ifndef OPENSSL_NO_IDEA 124#ifndef OPENSSL_NO_IDEA
125#include <openssl/idea.h> 125#include <openssl/idea.h>
126#endif 126#endif
127#ifndef OPENSSL_NO_MD4
128#include <openssl/md4.h>
129#endif
130#ifndef OPENSSL_NO_MD5 127#ifndef OPENSSL_NO_MD5
131#include <openssl/md5.h> 128#include <openssl/md5.h>
132#endif 129#endif
@@ -173,7 +170,8 @@ static int do_multi(int multi);
173#define MAX_ECDH_SIZE 256 170#define MAX_ECDH_SIZE 256
174 171
175static const char *names[ALGOR_NUM] = { 172static const char *names[ALGOR_NUM] = {
176 "md2", NULL /* was mdc2 */, "md4", "md5", "hmac(md5)", "sha1", "rmd160", 173 "md2", NULL /* was mdc2 */, NULL /* was md4 */, "md5", "hmac(md5)",
174 "sha1", "rmd160",
177 "rc4", "des cbc", "des ede3", "idea cbc", "seed cbc", 175 "rc4", "des cbc", "des ede3", "idea cbc", "seed cbc",
178 "rc2 cbc", "rc5-32/12 cbc", "blowfish cbc", "cast cbc", 176 "rc2 cbc", "rc5-32/12 cbc", "blowfish cbc", "cast cbc",
179 "aes-128 cbc", "aes-192 cbc", "aes-256 cbc", 177 "aes-128 cbc", "aes-192 cbc", "aes-256 cbc",
@@ -234,9 +232,6 @@ speed_main(int argc, char **argv)
234 long rsa_count; 232 long rsa_count;
235 unsigned rsa_num; 233 unsigned rsa_num;
236 unsigned char md[EVP_MAX_MD_SIZE]; 234 unsigned char md[EVP_MAX_MD_SIZE];
237#ifndef OPENSSL_NO_MD4
238 unsigned char md4[MD4_DIGEST_LENGTH];
239#endif
240#ifndef OPENSSL_NO_MD5 235#ifndef OPENSSL_NO_MD5
241 unsigned char md5[MD5_DIGEST_LENGTH]; 236 unsigned char md5[MD5_DIGEST_LENGTH];
242 unsigned char hmac[MD5_DIGEST_LENGTH]; 237 unsigned char hmac[MD5_DIGEST_LENGTH];
@@ -318,7 +313,6 @@ speed_main(int argc, char **argv)
318 CAMELLIA_KEY camellia_ks1, camellia_ks2, camellia_ks3; 313 CAMELLIA_KEY camellia_ks1, camellia_ks2, camellia_ks3;
319#endif 314#endif
320#define D_MD2 0 315#define D_MD2 0
321#define D_MD4 2
322#define D_MD5 3 316#define D_MD5 3
323#define D_HMAC 4 317#define D_HMAC 4
324#define D_SHA1 5 318#define D_SHA1 5
@@ -557,11 +551,6 @@ speed_main(int argc, char **argv)
557 j--; /* Otherwise, -mr gets confused with an 551 j--; /* Otherwise, -mr gets confused with an
558 * algorithm. */ 552 * algorithm. */
559 } else 553 } else
560#ifndef OPENSSL_NO_MD4
561 if (strcmp(*argv, "md4") == 0)
562 doit[D_MD4] = 1;
563 else
564#endif
565#ifndef OPENSSL_NO_MD5 554#ifndef OPENSSL_NO_MD5
566 if (strcmp(*argv, "md5") == 0) 555 if (strcmp(*argv, "md5") == 0)
567 doit[D_MD5] = 1; 556 doit[D_MD5] = 1;
@@ -812,9 +801,6 @@ speed_main(int argc, char **argv)
812 BIO_printf(bio_err, "Error: bad option or value\n"); 801 BIO_printf(bio_err, "Error: bad option or value\n");
813 BIO_printf(bio_err, "\n"); 802 BIO_printf(bio_err, "\n");
814 BIO_printf(bio_err, "Available values:\n"); 803 BIO_printf(bio_err, "Available values:\n");
815#ifndef OPENSSL_NO_MD4
816 BIO_printf(bio_err, "md4 ");
817#endif
818#ifndef OPENSSL_NO_MD5 804#ifndef OPENSSL_NO_MD5
819 BIO_printf(bio_err, "md5 "); 805 BIO_printf(bio_err, "md5 ");
820#ifndef OPENSSL_NO_HMAC 806#ifndef OPENSSL_NO_HMAC
@@ -837,7 +823,7 @@ speed_main(int argc, char **argv)
837 BIO_printf(bio_err, "rmd160"); 823 BIO_printf(bio_err, "rmd160");
838#endif 824#endif
839#if !defined(OPENSSL_NO_MD2) || \ 825#if !defined(OPENSSL_NO_MD2) || \
840 !defined(OPENSSL_NO_MD4) || !defined(OPENSSL_NO_MD5) || \ 826 !defined(OPENSSL_NO_MD5) || \
841 !defined(OPENSSL_NO_SHA1) || !defined(OPENSSL_NO_RIPEMD160) || \ 827 !defined(OPENSSL_NO_SHA1) || !defined(OPENSSL_NO_RIPEMD160) || \
842 !defined(OPENSSL_NO_WHIRLPOOL) 828 !defined(OPENSSL_NO_WHIRLPOOL)
843 BIO_printf(bio_err, "\n"); 829 BIO_printf(bio_err, "\n");
@@ -996,19 +982,6 @@ speed_main(int argc, char **argv)
996#define COUNT(d) (count) 982#define COUNT(d) (count)
997 signal(SIGALRM, sig_done); 983 signal(SIGALRM, sig_done);
998 984
999#ifndef OPENSSL_NO_MD4
1000 if (doit[D_MD4]) {
1001 for (j = 0; j < SIZE_NUM; j++) {
1002 print_message(names[D_MD4], c[D_MD4][j], lengths[j]);
1003 Time_F(START);
1004 for (count = 0, run = 1; COND(c[D_MD4][j]); count++)
1005 EVP_Digest(&(buf[0]), (unsigned long) lengths[j], &(md4[0]), NULL, EVP_md4(), NULL);
1006 d = Time_F(STOP);
1007 print_result(D_MD4, j, count, d);
1008 }
1009 }
1010#endif
1011
1012#ifndef OPENSSL_NO_MD5 985#ifndef OPENSSL_NO_MD5
1013 if (doit[D_MD5]) { 986 if (doit[D_MD5]) {
1014 for (j = 0; j < SIZE_NUM; j++) { 987 for (j = 0; j < SIZE_NUM; j++) {
diff --git a/src/usr.bin/openssl/ts.c b/src/usr.bin/openssl/ts.c
index 258e636b03..d2bf2a6cd6 100644
--- a/src/usr.bin/openssl/ts.c
+++ b/src/usr.bin/openssl/ts.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ts.c,v 1.7 2015/09/12 19:34:07 lteo Exp $ */ 1/* $OpenBSD: ts.c,v 1.8 2015/09/13 23:36:21 doug Exp $ */
2/* Written by Zoltan Glozik (zglozik@stones.com) for the OpenSSL 2/* Written by Zoltan Glozik (zglozik@stones.com) for the OpenSSL
3 * project 2002. 3 * project 2002.
4 */ 4 */
@@ -298,7 +298,7 @@ usage:
298 BIO_printf(bio_err, "usage:\n" 298 BIO_printf(bio_err, "usage:\n"
299 "ts -query [-config configfile] " 299 "ts -query [-config configfile] "
300 "[-data file_to_hash] [-digest digest_bytes]" 300 "[-data file_to_hash] [-digest digest_bytes]"
301 "[-md2|-md4|-md5|-sha|-sha1|-ripemd160] " 301 "[-md5|-sha1|-ripemd160] "
302 "[-policy object_id] [-no_nonce] [-cert] " 302 "[-policy object_id] [-no_nonce] [-cert] "
303 "[-in request.tsq] [-out request.tsq] [-text]\n"); 303 "[-in request.tsq] [-out request.tsq] [-text]\n");
304 BIO_printf(bio_err, "or\n" 304 BIO_printf(bio_err, "or\n"