summaryrefslogtreecommitdiff
path: root/src/usr.bin/openssl/speed.c
diff options
context:
space:
mode:
authordoug <>2015-06-20 01:07:25 +0000
committerdoug <>2015-06-20 01:07:25 +0000
commitd1a72a60fbd3d6dadffddba3c8b5d6caf10bfdb4 (patch)
tree144d1a93a079c76b8e2df6b6625e26229f129c6d /src/usr.bin/openssl/speed.c
parent423ea1a9bc2db6077e4924282a827eefbd2cdcd8 (diff)
downloadopenbsd-d1a72a60fbd3d6dadffddba3c8b5d6caf10bfdb4.tar.gz
openbsd-d1a72a60fbd3d6dadffddba3c8b5d6caf10bfdb4.tar.bz2
openbsd-d1a72a60fbd3d6dadffddba3c8b5d6caf10bfdb4.zip
Remove obsolete MDC-2DES from libcrypto.
ok deraadt@ jsing@ miod@
Diffstat (limited to 'src/usr.bin/openssl/speed.c')
-rw-r--r--src/usr.bin/openssl/speed.c34
1 files changed, 3 insertions, 31 deletions
diff --git a/src/usr.bin/openssl/speed.c b/src/usr.bin/openssl/speed.c
index 8795d6c434..236e0267bb 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.5 2015/02/08 10:22:45 doug Exp $ */ 1/* $OpenBSD: speed.c,v 1.6 2015/06/20 01:07:25 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_MDC2
128#include <openssl/mdc2.h>
129#endif
130#ifndef OPENSSL_NO_MD4 127#ifndef OPENSSL_NO_MD4
131#include <openssl/md4.h> 128#include <openssl/md4.h>
132#endif 129#endif
@@ -179,7 +176,7 @@ static int do_multi(int multi);
179#define MAX_ECDH_SIZE 256 176#define MAX_ECDH_SIZE 256
180 177
181static const char *names[ALGOR_NUM] = { 178static const char *names[ALGOR_NUM] = {
182 "md2", "mdc2", "md4", "md5", "hmac(md5)", "sha1", "rmd160", "rc4", 179 "md2", "md4", "md5", "hmac(md5)", "sha1", "rmd160", "rc4",
183 "des cbc", "des ede3", "idea cbc", "seed cbc", 180 "des cbc", "des ede3", "idea cbc", "seed cbc",
184 "rc2 cbc", "rc5-32/12 cbc", "blowfish cbc", "cast cbc", 181 "rc2 cbc", "rc5-32/12 cbc", "blowfish cbc", "cast cbc",
185 "aes-128 cbc", "aes-192 cbc", "aes-256 cbc", 182 "aes-128 cbc", "aes-192 cbc", "aes-256 cbc",
@@ -241,9 +238,6 @@ speed_main(int argc, char **argv)
241 long rsa_count; 238 long rsa_count;
242 unsigned rsa_num; 239 unsigned rsa_num;
243 unsigned char md[EVP_MAX_MD_SIZE]; 240 unsigned char md[EVP_MAX_MD_SIZE];
244#ifndef OPENSSL_NO_MDC2
245 unsigned char mdc2[MDC2_DIGEST_LENGTH];
246#endif
247#ifndef OPENSSL_NO_MD4 241#ifndef OPENSSL_NO_MD4
248 unsigned char md4[MD4_DIGEST_LENGTH]; 242 unsigned char md4[MD4_DIGEST_LENGTH];
249#endif 243#endif
@@ -331,7 +325,6 @@ speed_main(int argc, char **argv)
331 CAMELLIA_KEY camellia_ks1, camellia_ks2, camellia_ks3; 325 CAMELLIA_KEY camellia_ks1, camellia_ks2, camellia_ks3;
332#endif 326#endif
333#define D_MD2 0 327#define D_MD2 0
334#define D_MDC2 1
335#define D_MD4 2 328#define D_MD4 2
336#define D_MD5 3 329#define D_MD5 3
337#define D_HMAC 4 330#define D_HMAC 4
@@ -586,11 +579,6 @@ speed_main(int argc, char **argv)
586 j--; /* Otherwise, -mr gets confused with an 579 j--; /* Otherwise, -mr gets confused with an
587 * algorithm. */ 580 * algorithm. */
588 } else 581 } else
589#ifndef OPENSSL_NO_MDC2
590 if (strcmp(*argv, "mdc2") == 0)
591 doit[D_MDC2] = 1;
592 else
593#endif
594#ifndef OPENSSL_NO_MD4 582#ifndef OPENSSL_NO_MD4
595 if (strcmp(*argv, "md4") == 0) 583 if (strcmp(*argv, "md4") == 0)
596 doit[D_MD4] = 1; 584 doit[D_MD4] = 1;
@@ -844,9 +832,6 @@ speed_main(int argc, char **argv)
844 BIO_printf(bio_err, "Error: bad option or value\n"); 832 BIO_printf(bio_err, "Error: bad option or value\n");
845 BIO_printf(bio_err, "\n"); 833 BIO_printf(bio_err, "\n");
846 BIO_printf(bio_err, "Available values:\n"); 834 BIO_printf(bio_err, "Available values:\n");
847#ifndef OPENSSL_NO_MDC2
848 BIO_printf(bio_err, "mdc2 ");
849#endif
850#ifndef OPENSSL_NO_MD4 835#ifndef OPENSSL_NO_MD4
851 BIO_printf(bio_err, "md4 "); 836 BIO_printf(bio_err, "md4 ");
852#endif 837#endif
@@ -871,7 +856,7 @@ speed_main(int argc, char **argv)
871#ifndef OPENSSL_NO_RIPEMD160 856#ifndef OPENSSL_NO_RIPEMD160
872 BIO_printf(bio_err, "rmd160"); 857 BIO_printf(bio_err, "rmd160");
873#endif 858#endif
874#if !defined(OPENSSL_NO_MD2) || !defined(OPENSSL_NO_MDC2) || \ 859#if !defined(OPENSSL_NO_MD2) || \
875 !defined(OPENSSL_NO_MD4) || !defined(OPENSSL_NO_MD5) || \ 860 !defined(OPENSSL_NO_MD4) || !defined(OPENSSL_NO_MD5) || \
876 !defined(OPENSSL_NO_SHA1) || !defined(OPENSSL_NO_RIPEMD160) || \ 861 !defined(OPENSSL_NO_SHA1) || !defined(OPENSSL_NO_RIPEMD160) || \
877 !defined(OPENSSL_NO_WHIRLPOOL) 862 !defined(OPENSSL_NO_WHIRLPOOL)
@@ -1042,19 +1027,6 @@ speed_main(int argc, char **argv)
1042#define COUNT(d) (count) 1027#define COUNT(d) (count)
1043 signal(SIGALRM, sig_done); 1028 signal(SIGALRM, sig_done);
1044 1029
1045#ifndef OPENSSL_NO_MDC2
1046 if (doit[D_MDC2]) {
1047 for (j = 0; j < SIZE_NUM; j++) {
1048 print_message(names[D_MDC2], c[D_MDC2][j], lengths[j]);
1049 Time_F(START);
1050 for (count = 0, run = 1; COND(c[D_MDC2][j]); count++)
1051 EVP_Digest(buf, (unsigned long) lengths[j], &(mdc2[0]), NULL, EVP_mdc2(), NULL);
1052 d = Time_F(STOP);
1053 print_result(D_MDC2, j, count, d);
1054 }
1055 }
1056#endif
1057
1058#ifndef OPENSSL_NO_MD4 1030#ifndef OPENSSL_NO_MD4
1059 if (doit[D_MD4]) { 1031 if (doit[D_MD4]) {
1060 for (j = 0; j < SIZE_NUM; j++) { 1032 for (j = 0; j < SIZE_NUM; j++) {