diff options
Diffstat (limited to 'src/usr.bin/openssl')
| -rw-r--r-- | src/usr.bin/openssl/openssl.1 | 17 | ||||
| -rw-r--r-- | src/usr.bin/openssl/openssl.c | 5 | ||||
| -rw-r--r-- | src/usr.bin/openssl/req.c | 4 | ||||
| -rw-r--r-- | src/usr.bin/openssl/speed.c | 35 | ||||
| -rw-r--r-- | src/usr.bin/openssl/ts.c | 4 |
5 files changed, 49 insertions, 16 deletions
diff --git a/src/usr.bin/openssl/openssl.1 b/src/usr.bin/openssl/openssl.1 index de0a56735a..1ce8e84291 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.27 2015/09/13 23:36:21 doug Exp $ | 1 | .\" $OpenBSD: openssl.1,v 1.28 2015/09/14 01:45:03 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 | .\" |
| @@ -112,7 +112,7 @@ | |||
| 112 | .\" | 112 | .\" |
| 113 | .\" OPENSSL | 113 | .\" OPENSSL |
| 114 | .\" | 114 | .\" |
| 115 | .Dd $Mdocdate: September 13 2015 $ | 115 | .Dd $Mdocdate: September 14 2015 $ |
| 116 | .Dt OPENSSL 1 | 116 | .Dt OPENSSL 1 |
| 117 | .Os | 117 | .Os |
| 118 | .Sh NAME | 118 | .Sh NAME |
| @@ -383,6 +383,8 @@ Streebog-256 digest. | |||
| 383 | Streebog-512 digest. | 383 | Streebog-512 digest. |
| 384 | .It Cm md_gost94 | 384 | .It Cm md_gost94 |
| 385 | GOST R 34.11-94 digest. | 385 | GOST R 34.11-94 digest. |
| 386 | .It Cm md4 | ||
| 387 | MD4 digest. | ||
| 386 | .It Cm md5 | 388 | .It Cm md5 |
| 387 | MD5 digest. | 389 | MD5 digest. |
| 388 | .It Cm ripemd160 | 390 | .It Cm ripemd160 |
| @@ -1793,7 +1795,7 @@ install user certificates and CAs in MSIE using the Xenroll control. | |||
| 1793 | .Bk -words | 1795 | .Bk -words |
| 1794 | .Oo | 1796 | .Oo |
| 1795 | .Fl gost-mac | streebog256 | streebog512 | md_gost94 | | 1797 | .Fl gost-mac | streebog256 | streebog512 | md_gost94 | |
| 1796 | .Fl md5 | ripemd160 | sha1 | | 1798 | .Fl md4 | md5 | ripemd160 | sha | sha1 | |
| 1797 | .Fl sha224 | sha256 | sha384 | sha512 | whirlpool | 1799 | .Fl sha224 | sha256 | sha384 | sha512 | whirlpool |
| 1798 | .Oc | 1800 | .Oc |
| 1799 | .Op Fl binary | 1801 | .Op Fl binary |
| @@ -1816,7 +1818,7 @@ install user certificates and CAs in MSIE using the Xenroll control. | |||
| 1816 | .Pp | 1818 | .Pp |
| 1817 | .Nm openssl | 1819 | .Nm openssl |
| 1818 | .Cm gost-mac | streebog256 | streebog512 | md_gost94 | | 1820 | .Cm gost-mac | streebog256 | streebog512 | md_gost94 | |
| 1819 | .Cm md5 | ripemd160 | sha | sha1 | | 1821 | .Cm md4 | md5 | ripemd160 | sha | sha1 | |
| 1820 | .Cm sha224 | sha256 | sha384 | sha512 | whirlpool | 1822 | .Cm sha224 | sha256 | sha384 | sha512 | whirlpool |
| 1821 | .Op Fl c | 1823 | .Op Fl c |
| 1822 | .Op Fl d | 1824 | .Op Fl d |
| @@ -5083,7 +5085,7 @@ instead of standard output. | |||
| 5083 | .Op Fl key Ar keyfile | 5085 | .Op Fl key Ar keyfile |
| 5084 | .Op Fl keyform Ar DER | PEM | 5086 | .Op Fl keyform Ar DER | PEM |
| 5085 | .Op Fl keyout Ar file | 5087 | .Op Fl keyout Ar file |
| 5086 | .Op Fl md5 | sha1 | 5088 | .Op Fl md4 | md5 | sha1 |
| 5087 | .Op Fl modulus | 5089 | .Op Fl modulus |
| 5088 | .Op Fl nameopt Ar option | 5090 | .Op Fl nameopt Ar option |
| 5089 | .Op Fl new | 5091 | .Op Fl new |
| @@ -7662,6 +7664,7 @@ command were first added in | |||
| 7662 | .Op Cm dsa2048 | 7664 | .Op Cm dsa2048 |
| 7663 | .Op Cm hmac | 7665 | .Op Cm hmac |
| 7664 | .Op Cm md2 | 7666 | .Op Cm md2 |
| 7667 | .Op Cm md4 | ||
| 7665 | .Op Cm md5 | 7668 | .Op Cm md5 |
| 7666 | .Op Cm rc2 | 7669 | .Op Cm rc2 |
| 7667 | .Op Cm rc2-cbc | 7670 | .Op Cm rc2-cbc |
| @@ -7712,7 +7715,7 @@ benchmarks in parallel. | |||
| 7712 | .Nm "openssl ts" | 7715 | .Nm "openssl ts" |
| 7713 | .Bk -words | 7716 | .Bk -words |
| 7714 | .Fl query | 7717 | .Fl query |
| 7715 | .Op Fl md5 | ripemd160 | sha1 | 7718 | .Op Fl md4 | md5 | ripemd160 | sha | sha1 |
| 7716 | .Op Fl cert | 7719 | .Op Fl cert |
| 7717 | .Op Fl config Ar configfile | 7720 | .Op Fl config Ar configfile |
| 7718 | .Op Fl data Ar file_to_hash | 7721 | .Op Fl data Ar file_to_hash |
| @@ -7833,7 +7836,7 @@ This option specifies a previously created time stamp request in DER | |||
| 7833 | format that will be printed into the output file. | 7836 | format that will be printed into the output file. |
| 7834 | Useful when you need to examine the content of a request in human-readable | 7837 | Useful when you need to examine the content of a request in human-readable |
| 7835 | format. | 7838 | format. |
| 7836 | .It Fl md5|ripemd160|sha1 | 7839 | .It Fl md4|md5|ripemd160|sha|sha1 |
| 7837 | The message digest to apply to the data file. | 7840 | The message digest to apply to the data file. |
| 7838 | It supports all the message digest algorithms that are supported by the | 7841 | It supports all the message digest algorithms that are supported by the |
| 7839 | .Nm dgst | 7842 | .Nm dgst |
diff --git a/src/usr.bin/openssl/openssl.c b/src/usr.bin/openssl/openssl.c index 1bda338356..604cfddcea 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.11 2015/09/13 23:36:21 doug Exp $ */ | 1 | /* $OpenBSD: openssl.c,v 1.12 2015/09/14 01:45:03 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,6 +217,9 @@ 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 | ||
| 220 | #ifndef OPENSSL_NO_MD5 | 223 | #ifndef OPENSSL_NO_MD5 |
| 221 | { FUNC_TYPE_MD, "md5", dgst_main }, | 224 | { FUNC_TYPE_MD, "md5", dgst_main }, |
| 222 | #endif | 225 | #endif |
diff --git a/src/usr.bin/openssl/req.c b/src/usr.bin/openssl/req.c index f359e7392e..c7256ae59a 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.8 2015/09/13 23:36:21 doug Exp $ */ | 1 | /* $OpenBSD: req.c,v 1.9 2015/09/14 01:45:03 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)\n"); | 357 | BIO_printf(bio_err, " -[digest] Digest to sign with (md5, sha1, md4)\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 d9fe3309b7..292fa28634 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.14 2015/09/13 23:36:21 doug Exp $ */ | 1 | /* $OpenBSD: speed.c,v 1.15 2015/09/14 01:45:03 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,6 +124,9 @@ | |||
| 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 | ||
| 127 | #ifndef OPENSSL_NO_MD5 | 130 | #ifndef OPENSSL_NO_MD5 |
| 128 | #include <openssl/md5.h> | 131 | #include <openssl/md5.h> |
| 129 | #endif | 132 | #endif |
| @@ -170,8 +173,7 @@ static int do_multi(int multi); | |||
| 170 | #define MAX_ECDH_SIZE 256 | 173 | #define MAX_ECDH_SIZE 256 |
| 171 | 174 | ||
| 172 | static const char *names[ALGOR_NUM] = { | 175 | static const char *names[ALGOR_NUM] = { |
| 173 | "md2", NULL /* was mdc2 */, NULL /* was md4 */, "md5", "hmac(md5)", | 176 | "md2", NULL /* was mdc2 */, "md4", "md5", "hmac(md5)", "sha1", "rmd160", |
| 174 | "sha1", "rmd160", | ||
| 175 | "rc4", "des cbc", "des ede3", "idea cbc", "seed cbc", | 177 | "rc4", "des cbc", "des ede3", "idea cbc", "seed cbc", |
| 176 | "rc2 cbc", "rc5-32/12 cbc", "blowfish cbc", "cast cbc", | 178 | "rc2 cbc", "rc5-32/12 cbc", "blowfish cbc", "cast cbc", |
| 177 | "aes-128 cbc", "aes-192 cbc", "aes-256 cbc", | 179 | "aes-128 cbc", "aes-192 cbc", "aes-256 cbc", |
| @@ -232,6 +234,9 @@ speed_main(int argc, char **argv) | |||
| 232 | long rsa_count; | 234 | long rsa_count; |
| 233 | unsigned rsa_num; | 235 | unsigned rsa_num; |
| 234 | unsigned char md[EVP_MAX_MD_SIZE]; | 236 | unsigned char md[EVP_MAX_MD_SIZE]; |
| 237 | #ifndef OPENSSL_NO_MD4 | ||
| 238 | unsigned char md4[MD4_DIGEST_LENGTH]; | ||
| 239 | #endif | ||
| 235 | #ifndef OPENSSL_NO_MD5 | 240 | #ifndef OPENSSL_NO_MD5 |
| 236 | unsigned char md5[MD5_DIGEST_LENGTH]; | 241 | unsigned char md5[MD5_DIGEST_LENGTH]; |
| 237 | unsigned char hmac[MD5_DIGEST_LENGTH]; | 242 | unsigned char hmac[MD5_DIGEST_LENGTH]; |
| @@ -313,6 +318,7 @@ speed_main(int argc, char **argv) | |||
| 313 | CAMELLIA_KEY camellia_ks1, camellia_ks2, camellia_ks3; | 318 | CAMELLIA_KEY camellia_ks1, camellia_ks2, camellia_ks3; |
| 314 | #endif | 319 | #endif |
| 315 | #define D_MD2 0 | 320 | #define D_MD2 0 |
| 321 | #define D_MD4 2 | ||
| 316 | #define D_MD5 3 | 322 | #define D_MD5 3 |
| 317 | #define D_HMAC 4 | 323 | #define D_HMAC 4 |
| 318 | #define D_SHA1 5 | 324 | #define D_SHA1 5 |
| @@ -551,6 +557,11 @@ speed_main(int argc, char **argv) | |||
| 551 | j--; /* Otherwise, -mr gets confused with an | 557 | j--; /* Otherwise, -mr gets confused with an |
| 552 | * algorithm. */ | 558 | * algorithm. */ |
| 553 | } else | 559 | } else |
| 560 | #ifndef OPENSSL_NO_MD4 | ||
| 561 | if (strcmp(*argv, "md4") == 0) | ||
| 562 | doit[D_MD4] = 1; | ||
| 563 | else | ||
| 564 | #endif | ||
| 554 | #ifndef OPENSSL_NO_MD5 | 565 | #ifndef OPENSSL_NO_MD5 |
| 555 | if (strcmp(*argv, "md5") == 0) | 566 | if (strcmp(*argv, "md5") == 0) |
| 556 | doit[D_MD5] = 1; | 567 | doit[D_MD5] = 1; |
| @@ -801,6 +812,9 @@ speed_main(int argc, char **argv) | |||
| 801 | BIO_printf(bio_err, "Error: bad option or value\n"); | 812 | BIO_printf(bio_err, "Error: bad option or value\n"); |
| 802 | BIO_printf(bio_err, "\n"); | 813 | BIO_printf(bio_err, "\n"); |
| 803 | BIO_printf(bio_err, "Available values:\n"); | 814 | BIO_printf(bio_err, "Available values:\n"); |
| 815 | #ifndef OPENSSL_NO_MD4 | ||
| 816 | BIO_printf(bio_err, "md4 "); | ||
| 817 | #endif | ||
| 804 | #ifndef OPENSSL_NO_MD5 | 818 | #ifndef OPENSSL_NO_MD5 |
| 805 | BIO_printf(bio_err, "md5 "); | 819 | BIO_printf(bio_err, "md5 "); |
| 806 | #ifndef OPENSSL_NO_HMAC | 820 | #ifndef OPENSSL_NO_HMAC |
| @@ -823,7 +837,7 @@ speed_main(int argc, char **argv) | |||
| 823 | BIO_printf(bio_err, "rmd160"); | 837 | BIO_printf(bio_err, "rmd160"); |
| 824 | #endif | 838 | #endif |
| 825 | #if !defined(OPENSSL_NO_MD2) || \ | 839 | #if !defined(OPENSSL_NO_MD2) || \ |
| 826 | !defined(OPENSSL_NO_MD5) || \ | 840 | !defined(OPENSSL_NO_MD4) || !defined(OPENSSL_NO_MD5) || \ |
| 827 | !defined(OPENSSL_NO_SHA1) || !defined(OPENSSL_NO_RIPEMD160) || \ | 841 | !defined(OPENSSL_NO_SHA1) || !defined(OPENSSL_NO_RIPEMD160) || \ |
| 828 | !defined(OPENSSL_NO_WHIRLPOOL) | 842 | !defined(OPENSSL_NO_WHIRLPOOL) |
| 829 | BIO_printf(bio_err, "\n"); | 843 | BIO_printf(bio_err, "\n"); |
| @@ -982,6 +996,19 @@ speed_main(int argc, char **argv) | |||
| 982 | #define COUNT(d) (count) | 996 | #define COUNT(d) (count) |
| 983 | signal(SIGALRM, sig_done); | 997 | signal(SIGALRM, sig_done); |
| 984 | 998 | ||
| 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 | |||
| 985 | #ifndef OPENSSL_NO_MD5 | 1012 | #ifndef OPENSSL_NO_MD5 |
| 986 | if (doit[D_MD5]) { | 1013 | if (doit[D_MD5]) { |
| 987 | for (j = 0; j < SIZE_NUM; j++) { | 1014 | for (j = 0; j < SIZE_NUM; j++) { |
diff --git a/src/usr.bin/openssl/ts.c b/src/usr.bin/openssl/ts.c index d2bf2a6cd6..e193636868 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.8 2015/09/13 23:36:21 doug Exp $ */ | 1 | /* $OpenBSD: ts.c,v 1.9 2015/09/14 01:45:03 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 | "[-md5|-sha1|-ripemd160] " | 301 | "[-md2|-md4|-md5|-sha|-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" |
