diff options
| author | doug <> | 2015-06-20 01:07:25 +0000 | 
|---|---|---|
| committer | doug <> | 2015-06-20 01:07:25 +0000 | 
| commit | 13b44077b7b29b4c5c4e74960c560bfe55f3fde8 (patch) | |
| tree | 144d1a93a079c76b8e2df6b6625e26229f129c6d | |
| parent | 5f22e43ab16130f217f9100a74e7d4d376707354 (diff) | |
| download | openbsd-13b44077b7b29b4c5c4e74960c560bfe55f3fde8.tar.gz openbsd-13b44077b7b29b4c5c4e74960c560bfe55f3fde8.tar.bz2 openbsd-13b44077b7b29b4c5c4e74960c560bfe55f3fde8.zip | |
Remove obsolete MDC-2DES from libcrypto.
ok deraadt@ jsing@ miod@
Diffstat (limited to '')
46 files changed, 59 insertions, 1239 deletions
| diff --git a/src/lib/libcrypto/crypto/Makefile b/src/lib/libcrypto/crypto/Makefile index a4e65fd6a6..d523e8029d 100644 --- a/src/lib/libcrypto/crypto/Makefile +++ b/src/lib/libcrypto/crypto/Makefile | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # $OpenBSD: Makefile,v 1.57 2015/04/11 16:16:15 deraadt Exp $ | 1 | # $OpenBSD: Makefile,v 1.58 2015/06/20 01:07:24 doug Exp $ | 
| 2 | 2 | ||
| 3 | LIB= crypto | 3 | LIB= crypto | 
| 4 | 4 | ||
| @@ -146,7 +146,7 @@ SRCS+= e_des.c e_bf.c e_idea.c e_des3.c e_camellia.c | |||
| 146 | SRCS+= e_rc4.c e_aes.c names.c | 146 | SRCS+= e_rc4.c e_aes.c names.c | 
| 147 | SRCS+= e_xcbc_d.c e_rc2.c e_cast.c | 147 | SRCS+= e_xcbc_d.c e_rc2.c e_cast.c | 
| 148 | SRCS+= m_null.c m_md4.c m_md5.c m_sha.c m_sha1.c m_wp.c | 148 | SRCS+= m_null.c m_md4.c m_md5.c m_sha.c m_sha1.c m_wp.c | 
| 149 | SRCS+= m_dss.c m_dss1.c m_mdc2.c m_ripemd.c m_ecdsa.c | 149 | SRCS+= m_dss.c m_dss1.c m_ripemd.c m_ecdsa.c | 
| 150 | SRCS+= p_open.c p_seal.c p_sign.c p_verify.c p_lib.c p_enc.c p_dec.c | 150 | SRCS+= p_open.c p_seal.c p_sign.c p_verify.c p_lib.c p_enc.c p_dec.c | 
| 151 | SRCS+= bio_md.c bio_b64.c bio_enc.c evp_err.c e_null.c | 151 | SRCS+= bio_md.c bio_b64.c bio_enc.c evp_err.c e_null.c | 
| 152 | SRCS+= c_all.c evp_lib.c | 152 | SRCS+= c_all.c evp_lib.c | 
| @@ -180,9 +180,6 @@ SRCS+= md4_dgst.c md4_one.c | |||
| 180 | # md5/ | 180 | # md5/ | 
| 181 | SRCS+= md5_dgst.c md5_one.c | 181 | SRCS+= md5_dgst.c md5_one.c | 
| 182 | 182 | ||
| 183 | # mdc2/ | ||
| 184 | SRCS+= mdc2dgst.c mdc2_one.c | ||
| 185 | |||
| 186 | # modes/ | 183 | # modes/ | 
| 187 | SRCS+= cbc128.c ctr128.c cts128.c cfb128.c ofb128.c gcm128.c ccm128.c xts128.c | 184 | SRCS+= cbc128.c ctr128.c cts128.c cfb128.c ofb128.c gcm128.c ccm128.c xts128.c | 
| 188 | 185 | ||
| @@ -292,7 +289,6 @@ SRCS+= pcy_cache.c pcy_node.c pcy_data.c pcy_map.c pcy_tree.c pcy_lib.c | |||
| 292 | ${LCRYPTO_SRC}/lhash \ | 289 | ${LCRYPTO_SRC}/lhash \ | 
| 293 | ${LCRYPTO_SRC}/md4 \ | 290 | ${LCRYPTO_SRC}/md4 \ | 
| 294 | ${LCRYPTO_SRC}/md5 \ | 291 | ${LCRYPTO_SRC}/md5 \ | 
| 295 | ${LCRYPTO_SRC}/mdc2 \ | ||
| 296 | ${LCRYPTO_SRC}/modes \ | 292 | ${LCRYPTO_SRC}/modes \ | 
| 297 | ${LCRYPTO_SRC}/objects \ | 293 | ${LCRYPTO_SRC}/objects \ | 
| 298 | ${LCRYPTO_SRC}/ocsp \ | 294 | ${LCRYPTO_SRC}/ocsp \ | 
| @@ -352,7 +348,6 @@ HDRS=\ | |||
| 352 | crypto/lhash/lhash.h \ | 348 | crypto/lhash/lhash.h \ | 
| 353 | crypto/md4/md4.h \ | 349 | crypto/md4/md4.h \ | 
| 354 | crypto/md5/md5.h \ | 350 | crypto/md5/md5.h \ | 
| 355 | crypto/mdc2/mdc2.h \ | ||
| 356 | crypto/modes/modes.h \ | 351 | crypto/modes/modes.h \ | 
| 357 | crypto/objects/objects.h \ | 352 | crypto/objects/objects.h \ | 
| 358 | crypto/ocsp/ocsp.h \ | 353 | crypto/ocsp/ocsp.h \ | 
| diff --git a/src/lib/libcrypto/doc/EVP_DigestInit.pod b/src/lib/libcrypto/doc/EVP_DigestInit.pod index 4b48080b4a..ccb19fc0a7 100644 --- a/src/lib/libcrypto/doc/EVP_DigestInit.pod +++ b/src/lib/libcrypto/doc/EVP_DigestInit.pod | |||
| @@ -8,7 +8,7 @@ EVP_MD_CTX_copy_ex, EVP_MD_CTX_copy, EVP_MD_type, EVP_MD_pkey_type, | |||
| 8 | EVP_MD_size, EVP_MD_block_size, EVP_MD_CTX_md, EVP_MD_CTX_size, | 8 | EVP_MD_size, EVP_MD_block_size, EVP_MD_CTX_md, EVP_MD_CTX_size, | 
| 9 | EVP_MD_CTX_block_size, EVP_MD_CTX_type, EVP_md_null, EVP_md2, EVP_md5, EVP_sha, | 9 | EVP_MD_CTX_block_size, EVP_MD_CTX_type, EVP_md_null, EVP_md2, EVP_md5, EVP_sha, | 
| 10 | EVP_sha1, EVP_sha224, EVP_sha256, EVP_sha384, EVP_sha512, EVP_dss, EVP_dss1, | 10 | EVP_sha1, EVP_sha224, EVP_sha256, EVP_sha384, EVP_sha512, EVP_dss, EVP_dss1, | 
| 11 | EVP_mdc2, EVP_ripemd160, EVP_get_digestbyname, EVP_get_digestbynid, | 11 | EVP_ripemd160, EVP_get_digestbyname, EVP_get_digestbynid, | 
| 12 | EVP_get_digestbyobj - EVP digest routines | 12 | EVP_get_digestbyobj - EVP digest routines | 
| 13 | 13 | ||
| 14 | =head1 SYNOPSIS | 14 | =head1 SYNOPSIS | 
| @@ -53,7 +53,6 @@ EVP_get_digestbyobj - EVP digest routines | |||
| 53 | const EVP_MD *EVP_sha1(void); | 53 | const EVP_MD *EVP_sha1(void); | 
| 54 | const EVP_MD *EVP_dss(void); | 54 | const EVP_MD *EVP_dss(void); | 
| 55 | const EVP_MD *EVP_dss1(void); | 55 | const EVP_MD *EVP_dss1(void); | 
| 56 | const EVP_MD *EVP_mdc2(void); | ||
| 57 | const EVP_MD *EVP_ripemd160(void); | 56 | const EVP_MD *EVP_ripemd160(void); | 
| 58 | 57 | ||
| 59 | const EVP_MD *EVP_sha224(void); | 58 | const EVP_MD *EVP_sha224(void); | 
| @@ -134,8 +133,8 @@ algorithms are no longer linked this function is only retained for | |||
| 134 | compatibility reasons. | 133 | compatibility reasons. | 
| 135 | 134 | ||
| 136 | EVP_md2(), EVP_md5(), EVP_sha(), EVP_sha1(), EVP_sha224(), EVP_sha256(), | 135 | EVP_md2(), EVP_md5(), EVP_sha(), EVP_sha1(), EVP_sha224(), EVP_sha256(), | 
| 137 | EVP_sha384(), EVP_sha512(), EVP_mdc2() and EVP_ripemd160() return B<EVP_MD> | 136 | EVP_sha384(), EVP_sha512() and EVP_ripemd160() return B<EVP_MD> | 
| 138 | structures for the MD2, MD5, SHA, SHA1, SHA224, SHA256, SHA384, SHA512, MDC2 | 137 | structures for the MD2, MD5, SHA, SHA1, SHA224, SHA256, SHA384, SHA512 | 
| 139 | and RIPEMD160 digest algorithms respectively. | 138 | and RIPEMD160 digest algorithms respectively. | 
| 140 | 139 | ||
| 141 | EVP_dss() and EVP_dss1() return B<EVP_MD> structures for SHA and SHA1 digest | 140 | EVP_dss() and EVP_dss1() return B<EVP_MD> structures for SHA and SHA1 digest | 
| @@ -165,7 +164,7 @@ EVP_MD_size(), EVP_MD_block_size(), EVP_MD_CTX_size() and | |||
| 165 | EVP_MD_CTX_block_size() return the digest or block size in bytes. | 164 | EVP_MD_CTX_block_size() return the digest or block size in bytes. | 
| 166 | 165 | ||
| 167 | EVP_md_null(), EVP_md2(), EVP_md5(), EVP_sha(), EVP_sha1(), EVP_dss(), | 166 | EVP_md_null(), EVP_md2(), EVP_md5(), EVP_sha(), EVP_sha1(), EVP_dss(), | 
| 168 | EVP_dss1(), EVP_mdc2() and EVP_ripemd160() return pointers to the | 167 | EVP_dss1() and EVP_ripemd160() return pointers to the | 
| 169 | corresponding EVP_MD structures. | 168 | corresponding EVP_MD structures. | 
| 170 | 169 | ||
| 171 | EVP_get_digestbyname(), EVP_get_digestbynid() and EVP_get_digestbyobj() | 170 | EVP_get_digestbyname(), EVP_get_digestbynid() and EVP_get_digestbyobj() | 
| @@ -253,7 +252,7 @@ digest name passed on the command line. | |||
| 253 | =head1 SEE ALSO | 252 | =head1 SEE ALSO | 
| 254 | 253 | ||
| 255 | L<evp(3)|evp(3)>, L<hmac(3)|hmac(3)>, L<md2(3)|md2(3)>, | 254 | L<evp(3)|evp(3)>, L<hmac(3)|hmac(3)>, L<md2(3)|md2(3)>, | 
| 256 | L<md5(3)|md5(3)>, L<mdc2(3)|mdc2(3)>, L<ripemd(3)|ripemd(3)>, | 255 | L<md5(3)|md5(3)>, L<ripemd(3)|ripemd(3)>, | 
| 257 | L<sha(3)|sha(3)>, L<dgst(1)|dgst(1)> | 256 | L<sha(3)|sha(3)>, L<dgst(1)|dgst(1)> | 
| 258 | 257 | ||
| 259 | =head1 HISTORY | 258 | =head1 HISTORY | 
| @@ -266,7 +265,7 @@ EVP_MD_CTX_cleanup(), EVP_MD_CTX_destroy(), EVP_DigestInit_ex() | |||
| 266 | and EVP_DigestFinal_ex() were added in OpenSSL 0.9.7. | 265 | and EVP_DigestFinal_ex() were added in OpenSSL 0.9.7. | 
| 267 | 266 | ||
| 268 | EVP_md_null(), EVP_md2(), EVP_md5(), EVP_sha(), EVP_sha1(), | 267 | EVP_md_null(), EVP_md2(), EVP_md5(), EVP_sha(), EVP_sha1(), | 
| 269 | EVP_dss(), EVP_dss1(), EVP_mdc2() and EVP_ripemd160() were | 268 | EVP_dss(), EVP_dss1() and EVP_ripemd160() were | 
| 270 | changed to return truely const EVP_MD * in OpenSSL 0.9.7. | 269 | changed to return truely const EVP_MD * in OpenSSL 0.9.7. | 
| 271 | 270 | ||
| 272 | The link between digests and signing algorithms was fixed in OpenSSL 1.0 and | 271 | The link between digests and signing algorithms was fixed in OpenSSL 1.0 and | 
| diff --git a/src/lib/libcrypto/doc/EVP_DigestSignInit.pod b/src/lib/libcrypto/doc/EVP_DigestSignInit.pod index e70b88a4a9..7fd4c22e79 100644 --- a/src/lib/libcrypto/doc/EVP_DigestSignInit.pod +++ b/src/lib/libcrypto/doc/EVP_DigestSignInit.pod | |||
| @@ -74,7 +74,7 @@ which indicates the maximum possible signature for any set of parameters. | |||
| 74 | L<EVP_DigestVerifyInit(3)|EVP_DigestVerifyInit(3)>, | 74 | L<EVP_DigestVerifyInit(3)|EVP_DigestVerifyInit(3)>, | 
| 75 | L<EVP_DigestInit(3)|EVP_DigestInit(3)>, L<err(3)|err(3)>, | 75 | L<EVP_DigestInit(3)|EVP_DigestInit(3)>, L<err(3)|err(3)>, | 
| 76 | L<evp(3)|evp(3)>, L<hmac(3)|hmac(3)>, L<md2(3)|md2(3)>, | 76 | L<evp(3)|evp(3)>, L<hmac(3)|hmac(3)>, L<md2(3)|md2(3)>, | 
| 77 | L<md5(3)|md5(3)>, L<mdc2(3)|mdc2(3)>, L<ripemd(3)|ripemd(3)>, | 77 | L<md5(3)|md5(3)>, L<ripemd(3)|ripemd(3)>, | 
| 78 | L<sha(3)|sha(3)>, L<dgst(1)|dgst(1)> | 78 | L<sha(3)|sha(3)>, L<dgst(1)|dgst(1)> | 
| 79 | 79 | ||
| 80 | =head1 HISTORY | 80 | =head1 HISTORY | 
| diff --git a/src/lib/libcrypto/doc/EVP_DigestVerifyInit.pod b/src/lib/libcrypto/doc/EVP_DigestVerifyInit.pod index 9eebb15d22..0817cf0b02 100644 --- a/src/lib/libcrypto/doc/EVP_DigestVerifyInit.pod +++ b/src/lib/libcrypto/doc/EVP_DigestVerifyInit.pod | |||
| @@ -69,7 +69,7 @@ will occur. | |||
| 69 | L<EVP_DigestSignInit(3)|EVP_DigestSignInit(3)>, | 69 | L<EVP_DigestSignInit(3)|EVP_DigestSignInit(3)>, | 
| 70 | L<EVP_DigestInit(3)|EVP_DigestInit(3)>, L<err(3)|err(3)>, | 70 | L<EVP_DigestInit(3)|EVP_DigestInit(3)>, L<err(3)|err(3)>, | 
| 71 | L<evp(3)|evp(3)>, L<hmac(3)|hmac(3)>, L<md2(3)|md2(3)>, | 71 | L<evp(3)|evp(3)>, L<hmac(3)|hmac(3)>, L<md2(3)|md2(3)>, | 
| 72 | L<md5(3)|md5(3)>, L<mdc2(3)|mdc2(3)>, L<ripemd(3)|ripemd(3)>, | 72 | L<md5(3)|md5(3)>, L<ripemd(3)|ripemd(3)>, | 
| 73 | L<sha(3)|sha(3)>, L<dgst(1)|dgst(1)> | 73 | L<sha(3)|sha(3)>, L<dgst(1)|dgst(1)> | 
| 74 | 74 | ||
| 75 | =head1 HISTORY | 75 | =head1 HISTORY | 
| diff --git a/src/lib/libcrypto/doc/EVP_SignInit.pod b/src/lib/libcrypto/doc/EVP_SignInit.pod index 5a1b67e006..9aafa3d63a 100644 --- a/src/lib/libcrypto/doc/EVP_SignInit.pod +++ b/src/lib/libcrypto/doc/EVP_SignInit.pod | |||
| @@ -89,7 +89,7 @@ The previous two bugs are fixed in the newer EVP_SignDigest*() function. | |||
| 89 | L<EVP_VerifyInit(3)|EVP_VerifyInit(3)>, | 89 | L<EVP_VerifyInit(3)|EVP_VerifyInit(3)>, | 
| 90 | L<EVP_DigestInit(3)|EVP_DigestInit(3)>, L<err(3)|err(3)>, | 90 | L<EVP_DigestInit(3)|EVP_DigestInit(3)>, L<err(3)|err(3)>, | 
| 91 | L<evp(3)|evp(3)>, L<hmac(3)|hmac(3)>, L<md2(3)|md2(3)>, | 91 | L<evp(3)|evp(3)>, L<hmac(3)|hmac(3)>, L<md2(3)|md2(3)>, | 
| 92 | L<md5(3)|md5(3)>, L<mdc2(3)|mdc2(3)>, L<ripemd(3)|ripemd(3)>, | 92 | L<md5(3)|md5(3)>, L<ripemd(3)|ripemd(3)>, | 
| 93 | L<sha(3)|sha(3)>, L<dgst(1)|dgst(1)> | 93 | L<sha(3)|sha(3)>, L<dgst(1)|dgst(1)> | 
| 94 | 94 | ||
| 95 | =head1 HISTORY | 95 | =head1 HISTORY | 
| diff --git a/src/lib/libcrypto/doc/EVP_VerifyInit.pod b/src/lib/libcrypto/doc/EVP_VerifyInit.pod index c665ee2ebc..b0d3f8e4c9 100644 --- a/src/lib/libcrypto/doc/EVP_VerifyInit.pod +++ b/src/lib/libcrypto/doc/EVP_VerifyInit.pod | |||
| @@ -83,7 +83,7 @@ L<evp(3)|evp(3)>, | |||
| 83 | L<EVP_SignInit(3)|EVP_SignInit(3)>, | 83 | L<EVP_SignInit(3)|EVP_SignInit(3)>, | 
| 84 | L<EVP_DigestInit(3)|EVP_DigestInit(3)>, L<err(3)|err(3)>, | 84 | L<EVP_DigestInit(3)|EVP_DigestInit(3)>, L<err(3)|err(3)>, | 
| 85 | L<evp(3)|evp(3)>, L<hmac(3)|hmac(3)>, L<md2(3)|md2(3)>, | 85 | L<evp(3)|evp(3)>, L<hmac(3)|hmac(3)>, L<md2(3)|md2(3)>, | 
| 86 | L<md5(3)|md5(3)>, L<mdc2(3)|mdc2(3)>, L<ripemd(3)|ripemd(3)>, | 86 | L<md5(3)|md5(3)>, L<ripemd(3)|ripemd(3)>, | 
| 87 | L<sha(3)|sha(3)>, L<dgst(1)|dgst(1)> | 87 | L<sha(3)|sha(3)>, L<dgst(1)|dgst(1)> | 
| 88 | 88 | ||
| 89 | =head1 HISTORY | 89 | =head1 HISTORY | 
| diff --git a/src/lib/libcrypto/evp/c_all.c b/src/lib/libcrypto/evp/c_all.c index d794629ca8..5f9df3a7ad 100644 --- a/src/lib/libcrypto/evp/c_all.c +++ b/src/lib/libcrypto/evp/c_all.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: c_all.c,v 1.16 2015/02/10 11:45:09 jsing Exp $ */ | 1 | /* $OpenBSD: c_all.c,v 1.17 2015/06/20 01:07:24 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 | * | 
| @@ -265,9 +265,6 @@ OpenSSL_add_all_digests(void) | |||
| 265 | EVP_add_digest(EVP_streebog256()); | 265 | EVP_add_digest(EVP_streebog256()); | 
| 266 | EVP_add_digest(EVP_streebog512()); | 266 | EVP_add_digest(EVP_streebog512()); | 
| 267 | #endif | 267 | #endif | 
| 268 | #if !defined(OPENSSL_NO_MDC2) && !defined(OPENSSL_NO_DES) | ||
| 269 | EVP_add_digest(EVP_mdc2()); | ||
| 270 | #endif | ||
| 271 | #ifndef OPENSSL_NO_RIPEMD | 268 | #ifndef OPENSSL_NO_RIPEMD | 
| 272 | EVP_add_digest(EVP_ripemd160()); | 269 | EVP_add_digest(EVP_ripemd160()); | 
| 273 | EVP_add_digest_alias(SN_ripemd160, "ripemd"); | 270 | EVP_add_digest_alias(SN_ripemd160, "ripemd"); | 
| diff --git a/src/lib/libcrypto/evp/evp.h b/src/lib/libcrypto/evp/evp.h index 330e01e0e6..57f8753ced 100644 --- a/src/lib/libcrypto/evp/evp.h +++ b/src/lib/libcrypto/evp/evp.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: evp.h,v 1.44 2015/02/10 11:45:09 jsing Exp $ */ | 1 | /* $OpenBSD: evp.h,v 1.45 2015/06/20 01:07:24 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 | * | 
| @@ -669,9 +669,6 @@ const EVP_MD *EVP_sha256(void); | |||
| 669 | const EVP_MD *EVP_sha384(void); | 669 | const EVP_MD *EVP_sha384(void); | 
| 670 | const EVP_MD *EVP_sha512(void); | 670 | const EVP_MD *EVP_sha512(void); | 
| 671 | #endif | 671 | #endif | 
| 672 | #ifndef OPENSSL_NO_MDC2 | ||
| 673 | const EVP_MD *EVP_mdc2(void); | ||
| 674 | #endif | ||
| 675 | #ifndef OPENSSL_NO_RIPEMD | 672 | #ifndef OPENSSL_NO_RIPEMD | 
| 676 | const EVP_MD *EVP_ripemd160(void); | 673 | const EVP_MD *EVP_ripemd160(void); | 
| 677 | #endif | 674 | #endif | 
| diff --git a/src/lib/libcrypto/evp/m_mdc2.c b/src/lib/libcrypto/evp/m_mdc2.c deleted file mode 100644 index cfbdfc3852..0000000000 --- a/src/lib/libcrypto/evp/m_mdc2.c +++ /dev/null | |||
| @@ -1,118 +0,0 @@ | |||
| 1 | /* $OpenBSD: m_mdc2.c,v 1.15 2014/07/13 09:30:02 miod Exp $ */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | |||
| 61 | #include <openssl/opensslconf.h> | ||
| 62 | |||
| 63 | #ifndef OPENSSL_NO_MDC2 | ||
| 64 | |||
| 65 | #include <openssl/evp.h> | ||
| 66 | #include <openssl/mdc2.h> | ||
| 67 | #include <openssl/objects.h> | ||
| 68 | #include <openssl/x509.h> | ||
| 69 | |||
| 70 | #ifndef OPENSSL_NO_RSA | ||
| 71 | #include <openssl/rsa.h> | ||
| 72 | #endif | ||
| 73 | |||
| 74 | static int | ||
| 75 | init(EVP_MD_CTX *ctx) | ||
| 76 | { | ||
| 77 | return MDC2_Init(ctx->md_data); | ||
| 78 | } | ||
| 79 | |||
| 80 | static int | ||
| 81 | update(EVP_MD_CTX *ctx, const void *data, size_t count) | ||
| 82 | { | ||
| 83 | return MDC2_Update(ctx->md_data, data, count); | ||
| 84 | } | ||
| 85 | |||
| 86 | static int | ||
| 87 | final(EVP_MD_CTX *ctx, unsigned char *md) | ||
| 88 | { | ||
| 89 | return MDC2_Final(md, ctx->md_data); | ||
| 90 | } | ||
| 91 | |||
| 92 | static const EVP_MD mdc2_md = { | ||
| 93 | .type = NID_mdc2, | ||
| 94 | .pkey_type = NID_mdc2WithRSA, | ||
| 95 | .md_size = MDC2_DIGEST_LENGTH, | ||
| 96 | .flags = 0, | ||
| 97 | .init = init, | ||
| 98 | .update = update, | ||
| 99 | .final = final, | ||
| 100 | .copy = NULL, | ||
| 101 | .cleanup = NULL, | ||
| 102 | #ifndef OPENSSL_NO_RSA | ||
| 103 | .sign = (evp_sign_method *)RSA_sign_ASN1_OCTET_STRING, | ||
| 104 | .verify = (evp_verify_method *)RSA_verify_ASN1_OCTET_STRING, | ||
| 105 | .required_pkey_type = { | ||
| 106 | EVP_PKEY_RSA, EVP_PKEY_RSA2, 0, 0, | ||
| 107 | }, | ||
| 108 | #endif | ||
| 109 | .block_size = MDC2_BLOCK, | ||
| 110 | .ctx_size = sizeof(EVP_MD *) + sizeof(MDC2_CTX), | ||
| 111 | }; | ||
| 112 | |||
| 113 | const EVP_MD * | ||
| 114 | EVP_mdc2(void) | ||
| 115 | { | ||
| 116 | return (&mdc2_md); | ||
| 117 | } | ||
| 118 | #endif | ||
| diff --git a/src/lib/libcrypto/man/Makefile b/src/lib/libcrypto/man/Makefile index 872391db3e..c968943cc0 100644 --- a/src/lib/libcrypto/man/Makefile +++ b/src/lib/libcrypto/man/Makefile | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # $OpenBSD: Makefile,v 1.20 2015/05/24 15:44:52 schwarze Exp $ | 1 | # $OpenBSD: Makefile,v 1.21 2015/06/20 01:07:24 doug Exp $ | 
| 2 | 2 | ||
| 3 | .include <bsd.own.mk> # for NOMAN | 3 | .include <bsd.own.mk> # for NOMAN | 
| 4 | 4 | ||
| @@ -645,7 +645,6 @@ MLINKS+=\ | |||
| 645 | EVP_DigestInit.3 EVP_md2.3 \ | 645 | EVP_DigestInit.3 EVP_md2.3 \ | 
| 646 | EVP_DigestInit.3 EVP_md5.3 \ | 646 | EVP_DigestInit.3 EVP_md5.3 \ | 
| 647 | EVP_DigestInit.3 EVP_md_null.3 \ | 647 | EVP_DigestInit.3 EVP_md_null.3 \ | 
| 648 | EVP_DigestInit.3 EVP_mdc2.3 \ | ||
| 649 | EVP_DigestInit.3 EVP_ripemd160.3 \ | 648 | EVP_DigestInit.3 EVP_ripemd160.3 \ | 
| 650 | EVP_DigestInit.3 EVP_sha.3 \ | 649 | EVP_DigestInit.3 EVP_sha.3 \ | 
| 651 | EVP_DigestInit.3 EVP_sha1.3 \ | 650 | EVP_DigestInit.3 EVP_sha1.3 \ | 
| diff --git a/src/lib/libcrypto/mdc2/mdc2.h b/src/lib/libcrypto/mdc2/mdc2.h deleted file mode 100644 index 9128eeb878..0000000000 --- a/src/lib/libcrypto/mdc2/mdc2.h +++ /dev/null | |||
| @@ -1,97 +0,0 @@ | |||
| 1 | /* $OpenBSD: mdc2.h,v 1.13 2014/07/10 22:45:57 jsing Exp $ */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef HEADER_MDC2_H | ||
| 60 | #define HEADER_MDC2_H | ||
| 61 | |||
| 62 | #include <openssl/opensslconf.h> | ||
| 63 | |||
| 64 | #include <openssl/des.h> | ||
| 65 | |||
| 66 | #ifdef __cplusplus | ||
| 67 | extern "C" { | ||
| 68 | #endif | ||
| 69 | |||
| 70 | #ifdef OPENSSL_NO_MDC2 | ||
| 71 | #error MDC2 is disabled. | ||
| 72 | #endif | ||
| 73 | |||
| 74 | #define MDC2_BLOCK 8 | ||
| 75 | #define MDC2_DIGEST_LENGTH 16 | ||
| 76 | |||
| 77 | typedef struct mdc2_ctx_st | ||
| 78 | { | ||
| 79 | unsigned int num; | ||
| 80 | unsigned char data[MDC2_BLOCK]; | ||
| 81 | DES_cblock h,hh; | ||
| 82 | int pad_type; /* either 1 or 2, default 1 */ | ||
| 83 | } MDC2_CTX; | ||
| 84 | |||
| 85 | |||
| 86 | int MDC2_Init(MDC2_CTX *c); | ||
| 87 | int MDC2_Update(MDC2_CTX *c, const unsigned char *data, size_t len); | ||
| 88 | int MDC2_Final(unsigned char *md, MDC2_CTX *c); | ||
| 89 | unsigned char *MDC2(const unsigned char *d, size_t n, | ||
| 90 | unsigned char *md); | ||
| 91 | |||
| 92 | #ifdef __cplusplus | ||
| 93 | } | ||
| 94 | #endif | ||
| 95 | |||
| 96 | #endif | ||
| 97 | |||
| diff --git a/src/lib/libcrypto/mdc2/mdc2_one.c b/src/lib/libcrypto/mdc2/mdc2_one.c deleted file mode 100644 index 8f922b1c7d..0000000000 --- a/src/lib/libcrypto/mdc2/mdc2_one.c +++ /dev/null | |||
| @@ -1,77 +0,0 @@ | |||
| 1 | /* $OpenBSD: mdc2_one.c,v 1.4 2014/07/11 08:44:49 jsing Exp $ */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | |||
| 61 | #include <openssl/crypto.h> | ||
| 62 | #include <openssl/mdc2.h> | ||
| 63 | |||
| 64 | unsigned char *MDC2(const unsigned char *d, size_t n, unsigned char *md) | ||
| 65 | { | ||
| 66 | MDC2_CTX c; | ||
| 67 | static unsigned char m[MDC2_DIGEST_LENGTH]; | ||
| 68 | |||
| 69 | if (md == NULL) md=m; | ||
| 70 | if (!MDC2_Init(&c)) | ||
| 71 | return NULL; | ||
| 72 | MDC2_Update(&c,d,n); | ||
| 73 | MDC2_Final(md,&c); | ||
| 74 | OPENSSL_cleanse(&c,sizeof(c)); /* security consideration */ | ||
| 75 | return(md); | ||
| 76 | } | ||
| 77 | |||
| diff --git a/src/lib/libcrypto/mdc2/mdc2dgst.c b/src/lib/libcrypto/mdc2/mdc2dgst.c deleted file mode 100644 index b4b0068d59..0000000000 --- a/src/lib/libcrypto/mdc2/mdc2dgst.c +++ /dev/null | |||
| @@ -1,179 +0,0 @@ | |||
| 1 | /* $OpenBSD: mdc2dgst.c,v 1.7 2014/10/28 07:35:59 jsg Exp $ */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include <stdlib.h> | ||
| 61 | #include <string.h> | ||
| 62 | #include <openssl/crypto.h> | ||
| 63 | #include <openssl/des.h> | ||
| 64 | #include <openssl/mdc2.h> | ||
| 65 | |||
| 66 | #undef c2l | ||
| 67 | #define c2l(c,l) (l =((DES_LONG)(*((c)++))) , \ | ||
| 68 | l|=((DES_LONG)(*((c)++)))<< 8L, \ | ||
| 69 | l|=((DES_LONG)(*((c)++)))<<16L, \ | ||
| 70 | l|=((DES_LONG)(*((c)++)))<<24L) | ||
| 71 | |||
| 72 | #undef l2c | ||
| 73 | #define l2c(l,c) (*((c)++)=(unsigned char)(((l) )&0xff), \ | ||
| 74 | *((c)++)=(unsigned char)(((l)>> 8L)&0xff), \ | ||
| 75 | *((c)++)=(unsigned char)(((l)>>16L)&0xff), \ | ||
| 76 | *((c)++)=(unsigned char)(((l)>>24L)&0xff)) | ||
| 77 | |||
| 78 | static void mdc2_body(MDC2_CTX *c, const unsigned char *in, size_t len); | ||
| 79 | int MDC2_Init(MDC2_CTX *c) | ||
| 80 | { | ||
| 81 | c->num=0; | ||
| 82 | c->pad_type=1; | ||
| 83 | memset(&(c->h[0]),0x52,MDC2_BLOCK); | ||
| 84 | memset(&(c->hh[0]),0x25,MDC2_BLOCK); | ||
| 85 | return 1; | ||
| 86 | } | ||
| 87 | |||
| 88 | int MDC2_Update(MDC2_CTX *c, const unsigned char *in, size_t len) | ||
| 89 | { | ||
| 90 | size_t i,j; | ||
| 91 | |||
| 92 | i=c->num; | ||
| 93 | if (i != 0) | ||
| 94 | { | ||
| 95 | if (i+len < MDC2_BLOCK) | ||
| 96 | { | ||
| 97 | /* partial block */ | ||
| 98 | memcpy(&(c->data[i]),in,len); | ||
| 99 | c->num+=(int)len; | ||
| 100 | return 1; | ||
| 101 | } | ||
| 102 | else | ||
| 103 | { | ||
| 104 | /* filled one */ | ||
| 105 | j=MDC2_BLOCK-i; | ||
| 106 | memcpy(&(c->data[i]),in,j); | ||
| 107 | len-=j; | ||
| 108 | in+=j; | ||
| 109 | c->num=0; | ||
| 110 | mdc2_body(c,&(c->data[0]),MDC2_BLOCK); | ||
| 111 | } | ||
| 112 | } | ||
| 113 | i=len&~((size_t)MDC2_BLOCK-1); | ||
| 114 | if (i > 0) mdc2_body(c,in,i); | ||
| 115 | j=len-i; | ||
| 116 | if (j > 0) | ||
| 117 | { | ||
| 118 | memcpy(&(c->data[0]),&(in[i]),j); | ||
| 119 | c->num=(int)j; | ||
| 120 | } | ||
| 121 | return 1; | ||
| 122 | } | ||
| 123 | |||
| 124 | static void mdc2_body(MDC2_CTX *c, const unsigned char *in, size_t len) | ||
| 125 | { | ||
| 126 | DES_LONG tin0,tin1; | ||
| 127 | DES_LONG ttin0,ttin1; | ||
| 128 | DES_LONG d[2],dd[2]; | ||
| 129 | DES_key_schedule k; | ||
| 130 | unsigned char *p; | ||
| 131 | size_t i; | ||
| 132 | |||
| 133 | for (i=0; i<len; i+=8) | ||
| 134 | { | ||
| 135 | c2l(in,tin0); d[0]=dd[0]=tin0; | ||
| 136 | c2l(in,tin1); d[1]=dd[1]=tin1; | ||
| 137 | c->h[0]=(c->h[0]&0x9f)|0x40; | ||
| 138 | c->hh[0]=(c->hh[0]&0x9f)|0x20; | ||
| 139 | |||
| 140 | DES_set_odd_parity(&c->h); | ||
| 141 | DES_set_key_unchecked(&c->h,&k); | ||
| 142 | DES_encrypt1(d,&k,1); | ||
| 143 | |||
| 144 | DES_set_odd_parity(&c->hh); | ||
| 145 | DES_set_key_unchecked(&c->hh,&k); | ||
| 146 | DES_encrypt1(dd,&k,1); | ||
| 147 | |||
| 148 | ttin0=tin0^dd[0]; | ||
| 149 | ttin1=tin1^dd[1]; | ||
| 150 | tin0^=d[0]; | ||
| 151 | tin1^=d[1]; | ||
| 152 | |||
| 153 | p=c->h; | ||
| 154 | l2c(tin0,p); | ||
| 155 | l2c(ttin1,p); | ||
| 156 | p=c->hh; | ||
| 157 | l2c(ttin0,p); | ||
| 158 | l2c(tin1,p); | ||
| 159 | } | ||
| 160 | } | ||
| 161 | |||
| 162 | int MDC2_Final(unsigned char *md, MDC2_CTX *c) | ||
| 163 | { | ||
| 164 | unsigned int i; | ||
| 165 | int j; | ||
| 166 | |||
| 167 | i=c->num; | ||
| 168 | j=c->pad_type; | ||
| 169 | if ((i > 0) || (j == 2)) | ||
| 170 | { | ||
| 171 | if (j == 2) | ||
| 172 | c->data[i++]=0x80; | ||
| 173 | memset(&(c->data[i]),0,MDC2_BLOCK-i); | ||
| 174 | mdc2_body(c,c->data,MDC2_BLOCK); | ||
| 175 | } | ||
| 176 | memcpy(md,(char *)c->h,MDC2_BLOCK); | ||
| 177 | memcpy(&(md[MDC2_BLOCK]),(char *)c->hh,MDC2_BLOCK); | ||
| 178 | return 1; | ||
| 179 | } | ||
| diff --git a/src/lib/libcrypto/opensslfeatures.h b/src/lib/libcrypto/opensslfeatures.h index 811fac610f..a0fcc0078e 100644 --- a/src/lib/libcrypto/opensslfeatures.h +++ b/src/lib/libcrypto/opensslfeatures.h | |||
| @@ -6,6 +6,7 @@ | |||
| 6 | # define OPENSSL_NO_JPAKE | 6 | # define OPENSSL_NO_JPAKE | 
| 7 | # define OPENSSL_NO_KRB5 | 7 | # define OPENSSL_NO_KRB5 | 
| 8 | # define OPENSSL_NO_MD2 | 8 | # define OPENSSL_NO_MD2 | 
| 9 | # define OPENSSL_NO_MDC2 | ||
| 9 | # define OPENSSL_NO_PSK | 10 | # define OPENSSL_NO_PSK | 
| 10 | # define OPENSSL_NO_RC5 | 11 | # define OPENSSL_NO_RC5 | 
| 11 | # define OPENSSL_NO_RFC3779 | 12 | # define OPENSSL_NO_RFC3779 | 
| diff --git a/src/lib/libcrypto/rsa/rsa_pmeth.c b/src/lib/libcrypto/rsa/rsa_pmeth.c index 09166e105b..0b648138ee 100644 --- a/src/lib/libcrypto/rsa/rsa_pmeth.c +++ b/src/lib/libcrypto/rsa/rsa_pmeth.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: rsa_pmeth.c,v 1.16 2015/02/11 04:05:14 beck Exp $ */ | 1 | /* $OpenBSD: rsa_pmeth.c,v 1.17 2015/06/20 01:07:25 doug Exp $ */ | 
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 
| 3 | * project 2006. | 3 | * project 2006. | 
| 4 | */ | 4 | */ | 
| @@ -178,18 +178,7 @@ pkey_rsa_sign(EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen, | |||
| 178 | return -1; | 178 | return -1; | 
| 179 | } | 179 | } | 
| 180 | 180 | ||
| 181 | if (EVP_MD_type(rctx->md) == NID_mdc2) { | 181 | if (rctx->pad_mode == RSA_X931_PADDING) { | 
| 182 | unsigned int sltmp; | ||
| 183 | |||
| 184 | if (rctx->pad_mode != RSA_PKCS1_PADDING) | ||
| 185 | return -1; | ||
| 186 | ret = RSA_sign_ASN1_OCTET_STRING(NID_mdc2, tbs, tbslen, | ||
| 187 | sig, &sltmp, rsa); | ||
| 188 | |||
| 189 | if (ret <= 0) | ||
| 190 | return ret; | ||
| 191 | ret = sltmp; | ||
| 192 | } else if (rctx->pad_mode == RSA_X931_PADDING) { | ||
| 193 | if (!setup_tbuf(rctx, ctx)) | 182 | if (!setup_tbuf(rctx, ctx)) | 
| 194 | return -1; | 183 | return -1; | 
| 195 | memcpy(rctx->tbuf, tbs, tbslen); | 184 | memcpy(rctx->tbuf, tbs, tbslen); | 
| diff --git a/src/lib/libcrypto/rsa/rsa_sign.c b/src/lib/libcrypto/rsa/rsa_sign.c index a446b563b3..09d8ef329d 100644 --- a/src/lib/libcrypto/rsa/rsa_sign.c +++ b/src/lib/libcrypto/rsa/rsa_sign.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: rsa_sign.c,v 1.22 2014/07/11 08:44:49 jsing Exp $ */ | 1 | /* $OpenBSD: rsa_sign.c,v 1.23 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 | * | 
| @@ -180,21 +180,6 @@ int_rsa_verify(int dtype, const unsigned char *m, unsigned int m_len, | |||
| 180 | if (i <= 0) | 180 | if (i <= 0) | 
| 181 | goto err; | 181 | goto err; | 
| 182 | 182 | ||
| 183 | /* | ||
| 184 | * Oddball MDC2 case: signature can be OCTET STRING. | ||
| 185 | * check for correct tag and length octets. | ||
| 186 | */ | ||
| 187 | if (dtype == NID_mdc2 && i == 18 && s[0] == 0x04 && s[1] == 0x10) { | ||
| 188 | if (rm) { | ||
| 189 | memcpy(rm, s + 2, 16); | ||
| 190 | *prm_len = 16; | ||
| 191 | ret = 1; | ||
| 192 | } else if (memcmp(m, s + 2, 16)) | ||
| 193 | RSAerr(RSA_F_INT_RSA_VERIFY, RSA_R_BAD_SIGNATURE); | ||
| 194 | else | ||
| 195 | ret = 1; | ||
| 196 | } | ||
| 197 | |||
| 198 | /* Special case: SSL signature */ | 183 | /* Special case: SSL signature */ | 
| 199 | if (dtype == NID_md5_sha1) { | 184 | if (dtype == NID_md5_sha1) { | 
| 200 | if (i != SSL_SIG_LENGTH || memcmp(s, m, SSL_SIG_LENGTH)) | 185 | if (i != SSL_SIG_LENGTH || memcmp(s, m, SSL_SIG_LENGTH)) | 
| diff --git a/src/lib/libssl/src/crypto/evp/c_all.c b/src/lib/libssl/src/crypto/evp/c_all.c index d794629ca8..5f9df3a7ad 100644 --- a/src/lib/libssl/src/crypto/evp/c_all.c +++ b/src/lib/libssl/src/crypto/evp/c_all.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: c_all.c,v 1.16 2015/02/10 11:45:09 jsing Exp $ */ | 1 | /* $OpenBSD: c_all.c,v 1.17 2015/06/20 01:07:24 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 | * | 
| @@ -265,9 +265,6 @@ OpenSSL_add_all_digests(void) | |||
| 265 | EVP_add_digest(EVP_streebog256()); | 265 | EVP_add_digest(EVP_streebog256()); | 
| 266 | EVP_add_digest(EVP_streebog512()); | 266 | EVP_add_digest(EVP_streebog512()); | 
| 267 | #endif | 267 | #endif | 
| 268 | #if !defined(OPENSSL_NO_MDC2) && !defined(OPENSSL_NO_DES) | ||
| 269 | EVP_add_digest(EVP_mdc2()); | ||
| 270 | #endif | ||
| 271 | #ifndef OPENSSL_NO_RIPEMD | 268 | #ifndef OPENSSL_NO_RIPEMD | 
| 272 | EVP_add_digest(EVP_ripemd160()); | 269 | EVP_add_digest(EVP_ripemd160()); | 
| 273 | EVP_add_digest_alias(SN_ripemd160, "ripemd"); | 270 | EVP_add_digest_alias(SN_ripemd160, "ripemd"); | 
| diff --git a/src/lib/libssl/src/crypto/evp/evp.h b/src/lib/libssl/src/crypto/evp/evp.h index 330e01e0e6..57f8753ced 100644 --- a/src/lib/libssl/src/crypto/evp/evp.h +++ b/src/lib/libssl/src/crypto/evp/evp.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: evp.h,v 1.44 2015/02/10 11:45:09 jsing Exp $ */ | 1 | /* $OpenBSD: evp.h,v 1.45 2015/06/20 01:07:24 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 | * | 
| @@ -669,9 +669,6 @@ const EVP_MD *EVP_sha256(void); | |||
| 669 | const EVP_MD *EVP_sha384(void); | 669 | const EVP_MD *EVP_sha384(void); | 
| 670 | const EVP_MD *EVP_sha512(void); | 670 | const EVP_MD *EVP_sha512(void); | 
| 671 | #endif | 671 | #endif | 
| 672 | #ifndef OPENSSL_NO_MDC2 | ||
| 673 | const EVP_MD *EVP_mdc2(void); | ||
| 674 | #endif | ||
| 675 | #ifndef OPENSSL_NO_RIPEMD | 672 | #ifndef OPENSSL_NO_RIPEMD | 
| 676 | const EVP_MD *EVP_ripemd160(void); | 673 | const EVP_MD *EVP_ripemd160(void); | 
| 677 | #endif | 674 | #endif | 
| diff --git a/src/lib/libssl/src/crypto/evp/m_mdc2.c b/src/lib/libssl/src/crypto/evp/m_mdc2.c deleted file mode 100644 index cfbdfc3852..0000000000 --- a/src/lib/libssl/src/crypto/evp/m_mdc2.c +++ /dev/null | |||
| @@ -1,118 +0,0 @@ | |||
| 1 | /* $OpenBSD: m_mdc2.c,v 1.15 2014/07/13 09:30:02 miod Exp $ */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | |||
| 61 | #include <openssl/opensslconf.h> | ||
| 62 | |||
| 63 | #ifndef OPENSSL_NO_MDC2 | ||
| 64 | |||
| 65 | #include <openssl/evp.h> | ||
| 66 | #include <openssl/mdc2.h> | ||
| 67 | #include <openssl/objects.h> | ||
| 68 | #include <openssl/x509.h> | ||
| 69 | |||
| 70 | #ifndef OPENSSL_NO_RSA | ||
| 71 | #include <openssl/rsa.h> | ||
| 72 | #endif | ||
| 73 | |||
| 74 | static int | ||
| 75 | init(EVP_MD_CTX *ctx) | ||
| 76 | { | ||
| 77 | return MDC2_Init(ctx->md_data); | ||
| 78 | } | ||
| 79 | |||
| 80 | static int | ||
| 81 | update(EVP_MD_CTX *ctx, const void *data, size_t count) | ||
| 82 | { | ||
| 83 | return MDC2_Update(ctx->md_data, data, count); | ||
| 84 | } | ||
| 85 | |||
| 86 | static int | ||
| 87 | final(EVP_MD_CTX *ctx, unsigned char *md) | ||
| 88 | { | ||
| 89 | return MDC2_Final(md, ctx->md_data); | ||
| 90 | } | ||
| 91 | |||
| 92 | static const EVP_MD mdc2_md = { | ||
| 93 | .type = NID_mdc2, | ||
| 94 | .pkey_type = NID_mdc2WithRSA, | ||
| 95 | .md_size = MDC2_DIGEST_LENGTH, | ||
| 96 | .flags = 0, | ||
| 97 | .init = init, | ||
| 98 | .update = update, | ||
| 99 | .final = final, | ||
| 100 | .copy = NULL, | ||
| 101 | .cleanup = NULL, | ||
| 102 | #ifndef OPENSSL_NO_RSA | ||
| 103 | .sign = (evp_sign_method *)RSA_sign_ASN1_OCTET_STRING, | ||
| 104 | .verify = (evp_verify_method *)RSA_verify_ASN1_OCTET_STRING, | ||
| 105 | .required_pkey_type = { | ||
| 106 | EVP_PKEY_RSA, EVP_PKEY_RSA2, 0, 0, | ||
| 107 | }, | ||
| 108 | #endif | ||
| 109 | .block_size = MDC2_BLOCK, | ||
| 110 | .ctx_size = sizeof(EVP_MD *) + sizeof(MDC2_CTX), | ||
| 111 | }; | ||
| 112 | |||
| 113 | const EVP_MD * | ||
| 114 | EVP_mdc2(void) | ||
| 115 | { | ||
| 116 | return (&mdc2_md); | ||
| 117 | } | ||
| 118 | #endif | ||
| diff --git a/src/lib/libssl/src/crypto/mdc2/mdc2.h b/src/lib/libssl/src/crypto/mdc2/mdc2.h deleted file mode 100644 index 9128eeb878..0000000000 --- a/src/lib/libssl/src/crypto/mdc2/mdc2.h +++ /dev/null | |||
| @@ -1,97 +0,0 @@ | |||
| 1 | /* $OpenBSD: mdc2.h,v 1.13 2014/07/10 22:45:57 jsing Exp $ */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef HEADER_MDC2_H | ||
| 60 | #define HEADER_MDC2_H | ||
| 61 | |||
| 62 | #include <openssl/opensslconf.h> | ||
| 63 | |||
| 64 | #include <openssl/des.h> | ||
| 65 | |||
| 66 | #ifdef __cplusplus | ||
| 67 | extern "C" { | ||
| 68 | #endif | ||
| 69 | |||
| 70 | #ifdef OPENSSL_NO_MDC2 | ||
| 71 | #error MDC2 is disabled. | ||
| 72 | #endif | ||
| 73 | |||
| 74 | #define MDC2_BLOCK 8 | ||
| 75 | #define MDC2_DIGEST_LENGTH 16 | ||
| 76 | |||
| 77 | typedef struct mdc2_ctx_st | ||
| 78 | { | ||
| 79 | unsigned int num; | ||
| 80 | unsigned char data[MDC2_BLOCK]; | ||
| 81 | DES_cblock h,hh; | ||
| 82 | int pad_type; /* either 1 or 2, default 1 */ | ||
| 83 | } MDC2_CTX; | ||
| 84 | |||
| 85 | |||
| 86 | int MDC2_Init(MDC2_CTX *c); | ||
| 87 | int MDC2_Update(MDC2_CTX *c, const unsigned char *data, size_t len); | ||
| 88 | int MDC2_Final(unsigned char *md, MDC2_CTX *c); | ||
| 89 | unsigned char *MDC2(const unsigned char *d, size_t n, | ||
| 90 | unsigned char *md); | ||
| 91 | |||
| 92 | #ifdef __cplusplus | ||
| 93 | } | ||
| 94 | #endif | ||
| 95 | |||
| 96 | #endif | ||
| 97 | |||
| diff --git a/src/lib/libssl/src/crypto/mdc2/mdc2_one.c b/src/lib/libssl/src/crypto/mdc2/mdc2_one.c deleted file mode 100644 index 8f922b1c7d..0000000000 --- a/src/lib/libssl/src/crypto/mdc2/mdc2_one.c +++ /dev/null | |||
| @@ -1,77 +0,0 @@ | |||
| 1 | /* $OpenBSD: mdc2_one.c,v 1.4 2014/07/11 08:44:49 jsing Exp $ */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | |||
| 61 | #include <openssl/crypto.h> | ||
| 62 | #include <openssl/mdc2.h> | ||
| 63 | |||
| 64 | unsigned char *MDC2(const unsigned char *d, size_t n, unsigned char *md) | ||
| 65 | { | ||
| 66 | MDC2_CTX c; | ||
| 67 | static unsigned char m[MDC2_DIGEST_LENGTH]; | ||
| 68 | |||
| 69 | if (md == NULL) md=m; | ||
| 70 | if (!MDC2_Init(&c)) | ||
| 71 | return NULL; | ||
| 72 | MDC2_Update(&c,d,n); | ||
| 73 | MDC2_Final(md,&c); | ||
| 74 | OPENSSL_cleanse(&c,sizeof(c)); /* security consideration */ | ||
| 75 | return(md); | ||
| 76 | } | ||
| 77 | |||
| diff --git a/src/lib/libssl/src/crypto/mdc2/mdc2dgst.c b/src/lib/libssl/src/crypto/mdc2/mdc2dgst.c deleted file mode 100644 index b4b0068d59..0000000000 --- a/src/lib/libssl/src/crypto/mdc2/mdc2dgst.c +++ /dev/null | |||
| @@ -1,179 +0,0 @@ | |||
| 1 | /* $OpenBSD: mdc2dgst.c,v 1.7 2014/10/28 07:35:59 jsg Exp $ */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include <stdlib.h> | ||
| 61 | #include <string.h> | ||
| 62 | #include <openssl/crypto.h> | ||
| 63 | #include <openssl/des.h> | ||
| 64 | #include <openssl/mdc2.h> | ||
| 65 | |||
| 66 | #undef c2l | ||
| 67 | #define c2l(c,l) (l =((DES_LONG)(*((c)++))) , \ | ||
| 68 | l|=((DES_LONG)(*((c)++)))<< 8L, \ | ||
| 69 | l|=((DES_LONG)(*((c)++)))<<16L, \ | ||
| 70 | l|=((DES_LONG)(*((c)++)))<<24L) | ||
| 71 | |||
| 72 | #undef l2c | ||
| 73 | #define l2c(l,c) (*((c)++)=(unsigned char)(((l) )&0xff), \ | ||
| 74 | *((c)++)=(unsigned char)(((l)>> 8L)&0xff), \ | ||
| 75 | *((c)++)=(unsigned char)(((l)>>16L)&0xff), \ | ||
| 76 | *((c)++)=(unsigned char)(((l)>>24L)&0xff)) | ||
| 77 | |||
| 78 | static void mdc2_body(MDC2_CTX *c, const unsigned char *in, size_t len); | ||
| 79 | int MDC2_Init(MDC2_CTX *c) | ||
| 80 | { | ||
| 81 | c->num=0; | ||
| 82 | c->pad_type=1; | ||
| 83 | memset(&(c->h[0]),0x52,MDC2_BLOCK); | ||
| 84 | memset(&(c->hh[0]),0x25,MDC2_BLOCK); | ||
| 85 | return 1; | ||
| 86 | } | ||
| 87 | |||
| 88 | int MDC2_Update(MDC2_CTX *c, const unsigned char *in, size_t len) | ||
| 89 | { | ||
| 90 | size_t i,j; | ||
| 91 | |||
| 92 | i=c->num; | ||
| 93 | if (i != 0) | ||
| 94 | { | ||
| 95 | if (i+len < MDC2_BLOCK) | ||
| 96 | { | ||
| 97 | /* partial block */ | ||
| 98 | memcpy(&(c->data[i]),in,len); | ||
| 99 | c->num+=(int)len; | ||
| 100 | return 1; | ||
| 101 | } | ||
| 102 | else | ||
| 103 | { | ||
| 104 | /* filled one */ | ||
| 105 | j=MDC2_BLOCK-i; | ||
| 106 | memcpy(&(c->data[i]),in,j); | ||
| 107 | len-=j; | ||
| 108 | in+=j; | ||
| 109 | c->num=0; | ||
| 110 | mdc2_body(c,&(c->data[0]),MDC2_BLOCK); | ||
| 111 | } | ||
| 112 | } | ||
| 113 | i=len&~((size_t)MDC2_BLOCK-1); | ||
| 114 | if (i > 0) mdc2_body(c,in,i); | ||
| 115 | j=len-i; | ||
| 116 | if (j > 0) | ||
| 117 | { | ||
| 118 | memcpy(&(c->data[0]),&(in[i]),j); | ||
| 119 | c->num=(int)j; | ||
| 120 | } | ||
| 121 | return 1; | ||
| 122 | } | ||
| 123 | |||
| 124 | static void mdc2_body(MDC2_CTX *c, const unsigned char *in, size_t len) | ||
| 125 | { | ||
| 126 | DES_LONG tin0,tin1; | ||
| 127 | DES_LONG ttin0,ttin1; | ||
| 128 | DES_LONG d[2],dd[2]; | ||
| 129 | DES_key_schedule k; | ||
| 130 | unsigned char *p; | ||
| 131 | size_t i; | ||
| 132 | |||
| 133 | for (i=0; i<len; i+=8) | ||
| 134 | { | ||
| 135 | c2l(in,tin0); d[0]=dd[0]=tin0; | ||
| 136 | c2l(in,tin1); d[1]=dd[1]=tin1; | ||
| 137 | c->h[0]=(c->h[0]&0x9f)|0x40; | ||
| 138 | c->hh[0]=(c->hh[0]&0x9f)|0x20; | ||
| 139 | |||
| 140 | DES_set_odd_parity(&c->h); | ||
| 141 | DES_set_key_unchecked(&c->h,&k); | ||
| 142 | DES_encrypt1(d,&k,1); | ||
| 143 | |||
| 144 | DES_set_odd_parity(&c->hh); | ||
| 145 | DES_set_key_unchecked(&c->hh,&k); | ||
| 146 | DES_encrypt1(dd,&k,1); | ||
| 147 | |||
| 148 | ttin0=tin0^dd[0]; | ||
| 149 | ttin1=tin1^dd[1]; | ||
| 150 | tin0^=d[0]; | ||
| 151 | tin1^=d[1]; | ||
| 152 | |||
| 153 | p=c->h; | ||
| 154 | l2c(tin0,p); | ||
| 155 | l2c(ttin1,p); | ||
| 156 | p=c->hh; | ||
| 157 | l2c(ttin0,p); | ||
| 158 | l2c(tin1,p); | ||
| 159 | } | ||
| 160 | } | ||
| 161 | |||
| 162 | int MDC2_Final(unsigned char *md, MDC2_CTX *c) | ||
| 163 | { | ||
| 164 | unsigned int i; | ||
| 165 | int j; | ||
| 166 | |||
| 167 | i=c->num; | ||
| 168 | j=c->pad_type; | ||
| 169 | if ((i > 0) || (j == 2)) | ||
| 170 | { | ||
| 171 | if (j == 2) | ||
| 172 | c->data[i++]=0x80; | ||
| 173 | memset(&(c->data[i]),0,MDC2_BLOCK-i); | ||
| 174 | mdc2_body(c,c->data,MDC2_BLOCK); | ||
| 175 | } | ||
| 176 | memcpy(md,(char *)c->h,MDC2_BLOCK); | ||
| 177 | memcpy(&(md[MDC2_BLOCK]),(char *)c->hh,MDC2_BLOCK); | ||
| 178 | return 1; | ||
| 179 | } | ||
| diff --git a/src/lib/libssl/src/crypto/opensslfeatures.h b/src/lib/libssl/src/crypto/opensslfeatures.h index 811fac610f..a0fcc0078e 100644 --- a/src/lib/libssl/src/crypto/opensslfeatures.h +++ b/src/lib/libssl/src/crypto/opensslfeatures.h | |||
| @@ -6,6 +6,7 @@ | |||
| 6 | # define OPENSSL_NO_JPAKE | 6 | # define OPENSSL_NO_JPAKE | 
| 7 | # define OPENSSL_NO_KRB5 | 7 | # define OPENSSL_NO_KRB5 | 
| 8 | # define OPENSSL_NO_MD2 | 8 | # define OPENSSL_NO_MD2 | 
| 9 | # define OPENSSL_NO_MDC2 | ||
| 9 | # define OPENSSL_NO_PSK | 10 | # define OPENSSL_NO_PSK | 
| 10 | # define OPENSSL_NO_RC5 | 11 | # define OPENSSL_NO_RC5 | 
| 11 | # define OPENSSL_NO_RFC3779 | 12 | # define OPENSSL_NO_RFC3779 | 
| diff --git a/src/lib/libssl/src/crypto/rsa/rsa_pmeth.c b/src/lib/libssl/src/crypto/rsa/rsa_pmeth.c index 09166e105b..0b648138ee 100644 --- a/src/lib/libssl/src/crypto/rsa/rsa_pmeth.c +++ b/src/lib/libssl/src/crypto/rsa/rsa_pmeth.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: rsa_pmeth.c,v 1.16 2015/02/11 04:05:14 beck Exp $ */ | 1 | /* $OpenBSD: rsa_pmeth.c,v 1.17 2015/06/20 01:07:25 doug Exp $ */ | 
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 
| 3 | * project 2006. | 3 | * project 2006. | 
| 4 | */ | 4 | */ | 
| @@ -178,18 +178,7 @@ pkey_rsa_sign(EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen, | |||
| 178 | return -1; | 178 | return -1; | 
| 179 | } | 179 | } | 
| 180 | 180 | ||
| 181 | if (EVP_MD_type(rctx->md) == NID_mdc2) { | 181 | if (rctx->pad_mode == RSA_X931_PADDING) { | 
| 182 | unsigned int sltmp; | ||
| 183 | |||
| 184 | if (rctx->pad_mode != RSA_PKCS1_PADDING) | ||
| 185 | return -1; | ||
| 186 | ret = RSA_sign_ASN1_OCTET_STRING(NID_mdc2, tbs, tbslen, | ||
| 187 | sig, &sltmp, rsa); | ||
| 188 | |||
| 189 | if (ret <= 0) | ||
| 190 | return ret; | ||
| 191 | ret = sltmp; | ||
| 192 | } else if (rctx->pad_mode == RSA_X931_PADDING) { | ||
| 193 | if (!setup_tbuf(rctx, ctx)) | 182 | if (!setup_tbuf(rctx, ctx)) | 
| 194 | return -1; | 183 | return -1; | 
| 195 | memcpy(rctx->tbuf, tbs, tbslen); | 184 | memcpy(rctx->tbuf, tbs, tbslen); | 
| diff --git a/src/lib/libssl/src/crypto/rsa/rsa_sign.c b/src/lib/libssl/src/crypto/rsa/rsa_sign.c index a446b563b3..09d8ef329d 100644 --- a/src/lib/libssl/src/crypto/rsa/rsa_sign.c +++ b/src/lib/libssl/src/crypto/rsa/rsa_sign.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: rsa_sign.c,v 1.22 2014/07/11 08:44:49 jsing Exp $ */ | 1 | /* $OpenBSD: rsa_sign.c,v 1.23 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 | * | 
| @@ -180,21 +180,6 @@ int_rsa_verify(int dtype, const unsigned char *m, unsigned int m_len, | |||
| 180 | if (i <= 0) | 180 | if (i <= 0) | 
| 181 | goto err; | 181 | goto err; | 
| 182 | 182 | ||
| 183 | /* | ||
| 184 | * Oddball MDC2 case: signature can be OCTET STRING. | ||
| 185 | * check for correct tag and length octets. | ||
| 186 | */ | ||
| 187 | if (dtype == NID_mdc2 && i == 18 && s[0] == 0x04 && s[1] == 0x10) { | ||
| 188 | if (rm) { | ||
| 189 | memcpy(rm, s + 2, 16); | ||
| 190 | *prm_len = 16; | ||
| 191 | ret = 1; | ||
| 192 | } else if (memcmp(m, s + 2, 16)) | ||
| 193 | RSAerr(RSA_F_INT_RSA_VERIFY, RSA_R_BAD_SIGNATURE); | ||
| 194 | else | ||
| 195 | ret = 1; | ||
| 196 | } | ||
| 197 | |||
| 198 | /* Special case: SSL signature */ | 183 | /* Special case: SSL signature */ | 
| 199 | if (dtype == NID_md5_sha1) { | 184 | if (dtype == NID_md5_sha1) { | 
| 200 | if (i != SSL_SIG_LENGTH || memcmp(s, m, SSL_SIG_LENGTH)) | 185 | if (i != SSL_SIG_LENGTH || memcmp(s, m, SSL_SIG_LENGTH)) | 
| diff --git a/src/lib/libssl/src/doc/apps/ca.pod b/src/lib/libssl/src/doc/apps/ca.pod index 7294627d16..ecbe7954d6 100644 --- a/src/lib/libssl/src/doc/apps/ca.pod +++ b/src/lib/libssl/src/doc/apps/ca.pod | |||
| @@ -159,7 +159,7 @@ the number of days to certify the certificate for. | |||
| 159 | 159 | ||
| 160 | =item B<-md alg> | 160 | =item B<-md alg> | 
| 161 | 161 | ||
| 162 | the message digest to use. Possible values include md5, sha1 and mdc2. | 162 | the message digest to use. Possible values include md5 and sha1. | 
| 163 | This option also applies to CRLs. | 163 | This option also applies to CRLs. | 
| 164 | 164 | ||
| 165 | =item B<-policy arg> | 165 | =item B<-policy arg> | 
| diff --git a/src/lib/libssl/src/doc/apps/dgst.pod b/src/lib/libssl/src/doc/apps/dgst.pod index da690472a3..d8b2abc6fb 100644 --- a/src/lib/libssl/src/doc/apps/dgst.pod +++ b/src/lib/libssl/src/doc/apps/dgst.pod | |||
| @@ -2,12 +2,12 @@ | |||
| 2 | 2 | ||
| 3 | =head1 NAME | 3 | =head1 NAME | 
| 4 | 4 | ||
| 5 | dgst, md5, md4, md2, sha1, sha, mdc2, ripemd160 - message digests | 5 | dgst, md5, md4, md2, sha1, sha, ripemd160 - message digests | 
| 6 | 6 | ||
| 7 | =head1 SYNOPSIS | 7 | =head1 SYNOPSIS | 
| 8 | 8 | ||
| 9 | B<openssl> B<dgst> | 9 | B<openssl> B<dgst> | 
| 10 | [B<-md5|-md4|-md2|-sha1|-sha|-mdc2|-ripemd160|-dss1>] | 10 | [B<-md5|-md4|-md2|-sha1|-sha|-ripemd160|-dss1>] | 
| 11 | [B<-c>] | 11 | [B<-c>] | 
| 12 | [B<-d>] | 12 | [B<-d>] | 
| 13 | [B<-hex>] | 13 | [B<-hex>] | 
| @@ -22,7 +22,7 @@ B<openssl> B<dgst> | |||
| 22 | [B<-hmac key>] | 22 | [B<-hmac key>] | 
| 23 | [B<file...>] | 23 | [B<file...>] | 
| 24 | 24 | ||
| 25 | [B<md5|md4|md2|sha1|sha|mdc2|ripemd160>] | 25 | [B<md5|md4|md2|sha1|sha|ripemd160>] | 
| 26 | [B<-c>] | 26 | [B<-c>] | 
| 27 | [B<-d>] | 27 | [B<-d>] | 
| 28 | [B<file...>] | 28 | [B<file...>] | 
| diff --git a/src/lib/libssl/src/doc/apps/openssl.pod b/src/lib/libssl/src/doc/apps/openssl.pod index c40b50d950..718d679dbb 100644 --- a/src/lib/libssl/src/doc/apps/openssl.pod +++ b/src/lib/libssl/src/doc/apps/openssl.pod | |||
| @@ -271,10 +271,6 @@ MD2 Digest | |||
| 271 | 271 | ||
| 272 | MD5 Digest | 272 | MD5 Digest | 
| 273 | 273 | ||
| 274 | =item B<mdc2> | ||
| 275 | |||
| 276 | MDC2 Digest | ||
| 277 | |||
| 278 | =item B<rmd160> | 274 | =item B<rmd160> | 
| 279 | 275 | ||
| 280 | RMD-160 Digest | 276 | RMD-160 Digest | 
| diff --git a/src/lib/libssl/src/doc/apps/req.pod b/src/lib/libssl/src/doc/apps/req.pod index 4f6d64766d..3d556bd968 100644 --- a/src/lib/libssl/src/doc/apps/req.pod +++ b/src/lib/libssl/src/doc/apps/req.pod | |||
| @@ -387,7 +387,7 @@ option. For compatibility B<encrypt_rsa_key> is an equivalent option. | |||
| 387 | =item B<default_md> | 387 | =item B<default_md> | 
| 388 | 388 | ||
| 389 | This option specifies the digest algorithm to use. Possible values | 389 | This option specifies the digest algorithm to use. Possible values | 
| 390 | include B<md5 sha1 mdc2>. If not present then MD5 is used. This | 390 | include B<md5 sha1>. If not present then MD5 is used. This | 
| 391 | option can be overridden on the command line. | 391 | option can be overridden on the command line. | 
| 392 | 392 | ||
| 393 | =item B<string_mask> | 393 | =item B<string_mask> | 
| diff --git a/src/lib/libssl/src/doc/apps/speed.pod b/src/lib/libssl/src/doc/apps/speed.pod index 1cd1998d16..c309d9a060 100644 --- a/src/lib/libssl/src/doc/apps/speed.pod +++ b/src/lib/libssl/src/doc/apps/speed.pod | |||
| @@ -9,7 +9,6 @@ speed - test library performance | |||
| 9 | B<openssl speed> | 9 | B<openssl speed> | 
| 10 | [B<-engine id>] | 10 | [B<-engine id>] | 
| 11 | [B<md2>] | 11 | [B<md2>] | 
| 12 | [B<mdc2>] | ||
| 13 | [B<md5>] | 12 | [B<md5>] | 
| 14 | [B<hmac>] | 13 | [B<hmac>] | 
| 15 | [B<sha1>] | 14 | [B<sha1>] | 
| diff --git a/src/lib/libssl/src/doc/apps/ts.pod b/src/lib/libssl/src/doc/apps/ts.pod index 1abf9df566..3075b6887a 100644 --- a/src/lib/libssl/src/doc/apps/ts.pod +++ b/src/lib/libssl/src/doc/apps/ts.pod | |||
| @@ -12,7 +12,7 @@ B<-query> | |||
| 12 | [B<-config> configfile] | 12 | [B<-config> configfile] | 
| 13 | [B<-data> file_to_hash] | 13 | [B<-data> file_to_hash] | 
| 14 | [B<-digest> digest_bytes] | 14 | [B<-digest> digest_bytes] | 
| 15 | [B<-md2>|B<-md4>|B<-md5>|B<-sha>|B<-sha1>|B<-mdc2>|B<-ripemd160>|B<...>] | 15 | [B<-md2>|B<-md4>|B<-md5>|B<-sha>|B<-sha1>|B<-ripemd160>|B<...>] | 
| 16 | [B<-policy> object_id] | 16 | [B<-policy> object_id] | 
| 17 | [B<-no_nonce>] | 17 | [B<-no_nonce>] | 
| 18 | [B<-cert>] | 18 | [B<-cert>] | 
| @@ -124,7 +124,7 @@ per byte, the bytes optionally separated by colons (e.g. 1A:F6:01:... or | |||
| 124 | 1AF601...). The number of bytes must match the message digest algorithm | 124 | 1AF601...). The number of bytes must match the message digest algorithm | 
| 125 | in use. (Optional) | 125 | in use. (Optional) | 
| 126 | 126 | ||
| 127 | =item B<-md2>|B<-md4>|B<-md5>|B<-sha>|B<-sha1>|B<-mdc2>|B<-ripemd160>|B<...> | 127 | =item B<-md2>|B<-md4>|B<-md5>|B<-sha>|B<-sha1>|B<-ripemd160>|B<...> | 
| 128 | 128 | ||
| 129 | The message digest to apply to the data file, it supports all the message | 129 | The message digest to apply to the data file, it supports all the message | 
| 130 | digest algorithms that are supported by the openssl B<dgst> command. | 130 | digest algorithms that are supported by the openssl B<dgst> command. | 
| diff --git a/src/lib/libssl/src/doc/apps/x509.pod b/src/lib/libssl/src/doc/apps/x509.pod index e6ea9cd9d2..25471736a0 100644 --- a/src/lib/libssl/src/doc/apps/x509.pod +++ b/src/lib/libssl/src/doc/apps/x509.pod | |||
| @@ -50,7 +50,7 @@ B<openssl> B<x509> | |||
| 50 | [B<-CAserial filename>] | 50 | [B<-CAserial filename>] | 
| 51 | [B<-text>] | 51 | [B<-text>] | 
| 52 | [B<-C>] | 52 | [B<-C>] | 
| 53 | [B<-md2|-md5|-sha1|-mdc2>] | 53 | [B<-md2|-md5|-sha1>] | 
| 54 | [B<-clrext>] | 54 | [B<-clrext>] | 
| 55 | [B<-extfile filename>] | 55 | [B<-extfile filename>] | 
| 56 | [B<-extensions section>] | 56 | [B<-extensions section>] | 
| @@ -96,7 +96,7 @@ if this option is not specified. | |||
| 96 | This specifies the output filename to write to or standard output by | 96 | This specifies the output filename to write to or standard output by | 
| 97 | default. | 97 | default. | 
| 98 | 98 | ||
| 99 | =item B<-md2|-md5|-sha1|-mdc2> | 99 | =item B<-md2|-md5|-sha1> | 
| 100 | 100 | ||
| 101 | the digest to use. This affects any signing or display option that uses a message | 101 | the digest to use. This affects any signing or display option that uses a message | 
| 102 | digest, such as the B<-fingerprint>, B<-signkey> and B<-CA> options. If not | 102 | digest, such as the B<-fingerprint>, B<-signkey> and B<-CA> options. If not | 
| diff --git a/src/lib/libssl/src/doc/crypto/EVP_DigestInit.pod b/src/lib/libssl/src/doc/crypto/EVP_DigestInit.pod index 4b48080b4a..ccb19fc0a7 100644 --- a/src/lib/libssl/src/doc/crypto/EVP_DigestInit.pod +++ b/src/lib/libssl/src/doc/crypto/EVP_DigestInit.pod | |||
| @@ -8,7 +8,7 @@ EVP_MD_CTX_copy_ex, EVP_MD_CTX_copy, EVP_MD_type, EVP_MD_pkey_type, | |||
| 8 | EVP_MD_size, EVP_MD_block_size, EVP_MD_CTX_md, EVP_MD_CTX_size, | 8 | EVP_MD_size, EVP_MD_block_size, EVP_MD_CTX_md, EVP_MD_CTX_size, | 
| 9 | EVP_MD_CTX_block_size, EVP_MD_CTX_type, EVP_md_null, EVP_md2, EVP_md5, EVP_sha, | 9 | EVP_MD_CTX_block_size, EVP_MD_CTX_type, EVP_md_null, EVP_md2, EVP_md5, EVP_sha, | 
| 10 | EVP_sha1, EVP_sha224, EVP_sha256, EVP_sha384, EVP_sha512, EVP_dss, EVP_dss1, | 10 | EVP_sha1, EVP_sha224, EVP_sha256, EVP_sha384, EVP_sha512, EVP_dss, EVP_dss1, | 
| 11 | EVP_mdc2, EVP_ripemd160, EVP_get_digestbyname, EVP_get_digestbynid, | 11 | EVP_ripemd160, EVP_get_digestbyname, EVP_get_digestbynid, | 
| 12 | EVP_get_digestbyobj - EVP digest routines | 12 | EVP_get_digestbyobj - EVP digest routines | 
| 13 | 13 | ||
| 14 | =head1 SYNOPSIS | 14 | =head1 SYNOPSIS | 
| @@ -53,7 +53,6 @@ EVP_get_digestbyobj - EVP digest routines | |||
| 53 | const EVP_MD *EVP_sha1(void); | 53 | const EVP_MD *EVP_sha1(void); | 
| 54 | const EVP_MD *EVP_dss(void); | 54 | const EVP_MD *EVP_dss(void); | 
| 55 | const EVP_MD *EVP_dss1(void); | 55 | const EVP_MD *EVP_dss1(void); | 
| 56 | const EVP_MD *EVP_mdc2(void); | ||
| 57 | const EVP_MD *EVP_ripemd160(void); | 56 | const EVP_MD *EVP_ripemd160(void); | 
| 58 | 57 | ||
| 59 | const EVP_MD *EVP_sha224(void); | 58 | const EVP_MD *EVP_sha224(void); | 
| @@ -134,8 +133,8 @@ algorithms are no longer linked this function is only retained for | |||
| 134 | compatibility reasons. | 133 | compatibility reasons. | 
| 135 | 134 | ||
| 136 | EVP_md2(), EVP_md5(), EVP_sha(), EVP_sha1(), EVP_sha224(), EVP_sha256(), | 135 | EVP_md2(), EVP_md5(), EVP_sha(), EVP_sha1(), EVP_sha224(), EVP_sha256(), | 
| 137 | EVP_sha384(), EVP_sha512(), EVP_mdc2() and EVP_ripemd160() return B<EVP_MD> | 136 | EVP_sha384(), EVP_sha512() and EVP_ripemd160() return B<EVP_MD> | 
| 138 | structures for the MD2, MD5, SHA, SHA1, SHA224, SHA256, SHA384, SHA512, MDC2 | 137 | structures for the MD2, MD5, SHA, SHA1, SHA224, SHA256, SHA384, SHA512 | 
| 139 | and RIPEMD160 digest algorithms respectively. | 138 | and RIPEMD160 digest algorithms respectively. | 
| 140 | 139 | ||
| 141 | EVP_dss() and EVP_dss1() return B<EVP_MD> structures for SHA and SHA1 digest | 140 | EVP_dss() and EVP_dss1() return B<EVP_MD> structures for SHA and SHA1 digest | 
| @@ -165,7 +164,7 @@ EVP_MD_size(), EVP_MD_block_size(), EVP_MD_CTX_size() and | |||
| 165 | EVP_MD_CTX_block_size() return the digest or block size in bytes. | 164 | EVP_MD_CTX_block_size() return the digest or block size in bytes. | 
| 166 | 165 | ||
| 167 | EVP_md_null(), EVP_md2(), EVP_md5(), EVP_sha(), EVP_sha1(), EVP_dss(), | 166 | EVP_md_null(), EVP_md2(), EVP_md5(), EVP_sha(), EVP_sha1(), EVP_dss(), | 
| 168 | EVP_dss1(), EVP_mdc2() and EVP_ripemd160() return pointers to the | 167 | EVP_dss1() and EVP_ripemd160() return pointers to the | 
| 169 | corresponding EVP_MD structures. | 168 | corresponding EVP_MD structures. | 
| 170 | 169 | ||
| 171 | EVP_get_digestbyname(), EVP_get_digestbynid() and EVP_get_digestbyobj() | 170 | EVP_get_digestbyname(), EVP_get_digestbynid() and EVP_get_digestbyobj() | 
| @@ -253,7 +252,7 @@ digest name passed on the command line. | |||
| 253 | =head1 SEE ALSO | 252 | =head1 SEE ALSO | 
| 254 | 253 | ||
| 255 | L<evp(3)|evp(3)>, L<hmac(3)|hmac(3)>, L<md2(3)|md2(3)>, | 254 | L<evp(3)|evp(3)>, L<hmac(3)|hmac(3)>, L<md2(3)|md2(3)>, | 
| 256 | L<md5(3)|md5(3)>, L<mdc2(3)|mdc2(3)>, L<ripemd(3)|ripemd(3)>, | 255 | L<md5(3)|md5(3)>, L<ripemd(3)|ripemd(3)>, | 
| 257 | L<sha(3)|sha(3)>, L<dgst(1)|dgst(1)> | 256 | L<sha(3)|sha(3)>, L<dgst(1)|dgst(1)> | 
| 258 | 257 | ||
| 259 | =head1 HISTORY | 258 | =head1 HISTORY | 
| @@ -266,7 +265,7 @@ EVP_MD_CTX_cleanup(), EVP_MD_CTX_destroy(), EVP_DigestInit_ex() | |||
| 266 | and EVP_DigestFinal_ex() were added in OpenSSL 0.9.7. | 265 | and EVP_DigestFinal_ex() were added in OpenSSL 0.9.7. | 
| 267 | 266 | ||
| 268 | EVP_md_null(), EVP_md2(), EVP_md5(), EVP_sha(), EVP_sha1(), | 267 | EVP_md_null(), EVP_md2(), EVP_md5(), EVP_sha(), EVP_sha1(), | 
| 269 | EVP_dss(), EVP_dss1(), EVP_mdc2() and EVP_ripemd160() were | 268 | EVP_dss(), EVP_dss1() and EVP_ripemd160() were | 
| 270 | changed to return truely const EVP_MD * in OpenSSL 0.9.7. | 269 | changed to return truely const EVP_MD * in OpenSSL 0.9.7. | 
| 271 | 270 | ||
| 272 | The link between digests and signing algorithms was fixed in OpenSSL 1.0 and | 271 | The link between digests and signing algorithms was fixed in OpenSSL 1.0 and | 
| diff --git a/src/lib/libssl/src/doc/crypto/EVP_DigestSignInit.pod b/src/lib/libssl/src/doc/crypto/EVP_DigestSignInit.pod index e70b88a4a9..7fd4c22e79 100644 --- a/src/lib/libssl/src/doc/crypto/EVP_DigestSignInit.pod +++ b/src/lib/libssl/src/doc/crypto/EVP_DigestSignInit.pod | |||
| @@ -74,7 +74,7 @@ which indicates the maximum possible signature for any set of parameters. | |||
| 74 | L<EVP_DigestVerifyInit(3)|EVP_DigestVerifyInit(3)>, | 74 | L<EVP_DigestVerifyInit(3)|EVP_DigestVerifyInit(3)>, | 
| 75 | L<EVP_DigestInit(3)|EVP_DigestInit(3)>, L<err(3)|err(3)>, | 75 | L<EVP_DigestInit(3)|EVP_DigestInit(3)>, L<err(3)|err(3)>, | 
| 76 | L<evp(3)|evp(3)>, L<hmac(3)|hmac(3)>, L<md2(3)|md2(3)>, | 76 | L<evp(3)|evp(3)>, L<hmac(3)|hmac(3)>, L<md2(3)|md2(3)>, | 
| 77 | L<md5(3)|md5(3)>, L<mdc2(3)|mdc2(3)>, L<ripemd(3)|ripemd(3)>, | 77 | L<md5(3)|md5(3)>, L<ripemd(3)|ripemd(3)>, | 
| 78 | L<sha(3)|sha(3)>, L<dgst(1)|dgst(1)> | 78 | L<sha(3)|sha(3)>, L<dgst(1)|dgst(1)> | 
| 79 | 79 | ||
| 80 | =head1 HISTORY | 80 | =head1 HISTORY | 
| diff --git a/src/lib/libssl/src/doc/crypto/EVP_DigestVerifyInit.pod b/src/lib/libssl/src/doc/crypto/EVP_DigestVerifyInit.pod index 9eebb15d22..0817cf0b02 100644 --- a/src/lib/libssl/src/doc/crypto/EVP_DigestVerifyInit.pod +++ b/src/lib/libssl/src/doc/crypto/EVP_DigestVerifyInit.pod | |||
| @@ -69,7 +69,7 @@ will occur. | |||
| 69 | L<EVP_DigestSignInit(3)|EVP_DigestSignInit(3)>, | 69 | L<EVP_DigestSignInit(3)|EVP_DigestSignInit(3)>, | 
| 70 | L<EVP_DigestInit(3)|EVP_DigestInit(3)>, L<err(3)|err(3)>, | 70 | L<EVP_DigestInit(3)|EVP_DigestInit(3)>, L<err(3)|err(3)>, | 
| 71 | L<evp(3)|evp(3)>, L<hmac(3)|hmac(3)>, L<md2(3)|md2(3)>, | 71 | L<evp(3)|evp(3)>, L<hmac(3)|hmac(3)>, L<md2(3)|md2(3)>, | 
| 72 | L<md5(3)|md5(3)>, L<mdc2(3)|mdc2(3)>, L<ripemd(3)|ripemd(3)>, | 72 | L<md5(3)|md5(3)>, L<ripemd(3)|ripemd(3)>, | 
| 73 | L<sha(3)|sha(3)>, L<dgst(1)|dgst(1)> | 73 | L<sha(3)|sha(3)>, L<dgst(1)|dgst(1)> | 
| 74 | 74 | ||
| 75 | =head1 HISTORY | 75 | =head1 HISTORY | 
| diff --git a/src/lib/libssl/src/doc/crypto/EVP_SignInit.pod b/src/lib/libssl/src/doc/crypto/EVP_SignInit.pod index 5a1b67e006..9aafa3d63a 100644 --- a/src/lib/libssl/src/doc/crypto/EVP_SignInit.pod +++ b/src/lib/libssl/src/doc/crypto/EVP_SignInit.pod | |||
| @@ -89,7 +89,7 @@ The previous two bugs are fixed in the newer EVP_SignDigest*() function. | |||
| 89 | L<EVP_VerifyInit(3)|EVP_VerifyInit(3)>, | 89 | L<EVP_VerifyInit(3)|EVP_VerifyInit(3)>, | 
| 90 | L<EVP_DigestInit(3)|EVP_DigestInit(3)>, L<err(3)|err(3)>, | 90 | L<EVP_DigestInit(3)|EVP_DigestInit(3)>, L<err(3)|err(3)>, | 
| 91 | L<evp(3)|evp(3)>, L<hmac(3)|hmac(3)>, L<md2(3)|md2(3)>, | 91 | L<evp(3)|evp(3)>, L<hmac(3)|hmac(3)>, L<md2(3)|md2(3)>, | 
| 92 | L<md5(3)|md5(3)>, L<mdc2(3)|mdc2(3)>, L<ripemd(3)|ripemd(3)>, | 92 | L<md5(3)|md5(3)>, L<ripemd(3)|ripemd(3)>, | 
| 93 | L<sha(3)|sha(3)>, L<dgst(1)|dgst(1)> | 93 | L<sha(3)|sha(3)>, L<dgst(1)|dgst(1)> | 
| 94 | 94 | ||
| 95 | =head1 HISTORY | 95 | =head1 HISTORY | 
| diff --git a/src/lib/libssl/src/doc/crypto/EVP_VerifyInit.pod b/src/lib/libssl/src/doc/crypto/EVP_VerifyInit.pod index c665ee2ebc..b0d3f8e4c9 100644 --- a/src/lib/libssl/src/doc/crypto/EVP_VerifyInit.pod +++ b/src/lib/libssl/src/doc/crypto/EVP_VerifyInit.pod | |||
| @@ -83,7 +83,7 @@ L<evp(3)|evp(3)>, | |||
| 83 | L<EVP_SignInit(3)|EVP_SignInit(3)>, | 83 | L<EVP_SignInit(3)|EVP_SignInit(3)>, | 
| 84 | L<EVP_DigestInit(3)|EVP_DigestInit(3)>, L<err(3)|err(3)>, | 84 | L<EVP_DigestInit(3)|EVP_DigestInit(3)>, L<err(3)|err(3)>, | 
| 85 | L<evp(3)|evp(3)>, L<hmac(3)|hmac(3)>, L<md2(3)|md2(3)>, | 85 | L<evp(3)|evp(3)>, L<hmac(3)|hmac(3)>, L<md2(3)|md2(3)>, | 
| 86 | L<md5(3)|md5(3)>, L<mdc2(3)|mdc2(3)>, L<ripemd(3)|ripemd(3)>, | 86 | L<md5(3)|md5(3)>, L<ripemd(3)|ripemd(3)>, | 
| 87 | L<sha(3)|sha(3)>, L<dgst(1)|dgst(1)> | 87 | L<sha(3)|sha(3)>, L<dgst(1)|dgst(1)> | 
| 88 | 88 | ||
| 89 | =head1 HISTORY | 89 | =head1 HISTORY | 
| diff --git a/src/lib/libssl/src/doc/crypto/crypto.pod b/src/lib/libssl/src/doc/crypto/crypto.pod index 2349014fce..bbd6ce9ea9 100644 --- a/src/lib/libssl/src/doc/crypto/crypto.pod +++ b/src/lib/libssl/src/doc/crypto/crypto.pod | |||
| @@ -41,7 +41,7 @@ L<x509(3)|x509(3)>, L<x509v3(3)|x509v3(3)> | |||
| 41 | =item AUTHENTICATION CODES, HASH FUNCTIONS | 41 | =item AUTHENTICATION CODES, HASH FUNCTIONS | 
| 42 | 42 | ||
| 43 | L<hmac(3)|hmac(3)>, L<md2(3)|md2(3)>, L<md4(3)|md4(3)>, | 43 | L<hmac(3)|hmac(3)>, L<md2(3)|md2(3)>, L<md4(3)|md4(3)>, | 
| 44 | L<md5(3)|md5(3)>, L<mdc2(3)|mdc2(3)>, L<ripemd(3)|ripemd(3)>, | 44 | L<md5(3)|md5(3)>, L<ripemd(3)|ripemd(3)>, | 
| 45 | L<sha(3)|sha(3)> | 45 | L<sha(3)|sha(3)> | 
| 46 | 46 | ||
| 47 | =item AUXILIARY FUNCTIONS | 47 | =item AUXILIARY FUNCTIONS | 
| diff --git a/src/regress/lib/libcrypto/Makefile b/src/regress/lib/libcrypto/Makefile index 3836a55d98..b2247a7b29 100644 --- a/src/regress/lib/libcrypto/Makefile +++ b/src/regress/lib/libcrypto/Makefile | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # $OpenBSD: Makefile,v 1.17 2014/11/18 21:52:43 miod Exp $ | 1 | # $OpenBSD: Makefile,v 1.18 2015/06/20 01:07:25 doug Exp $ | 
| 2 | 2 | ||
| 3 | SUBDIR= \ | 3 | SUBDIR= \ | 
| 4 | aead \ | 4 | aead \ | 
| @@ -26,7 +26,6 @@ SUBDIR= \ | |||
| 26 | ige \ | 26 | ige \ | 
| 27 | md4 \ | 27 | md4 \ | 
| 28 | md5 \ | 28 | md5 \ | 
| 29 | mdc2 \ | ||
| 30 | pbkdf2 \ | 29 | pbkdf2 \ | 
| 31 | pkcs7 \ | 30 | pkcs7 \ | 
| 32 | poly1305 \ | 31 | poly1305 \ | 
| diff --git a/src/regress/lib/libcrypto/mdc2/Makefile b/src/regress/lib/libcrypto/mdc2/Makefile deleted file mode 100644 index 67764ec7df..0000000000 --- a/src/regress/lib/libcrypto/mdc2/Makefile +++ /dev/null | |||
| @@ -1,9 +0,0 @@ | |||
| 1 | # $OpenBSD: Makefile,v 1.3 2014/07/08 15:53:52 jsing Exp $ | ||
| 2 | |||
| 3 | PROG= mdc2test | ||
| 4 | LDADD= -lcrypto | ||
| 5 | DPADD= ${LIBCRYPTO} | ||
| 6 | WARNINGS= Yes | ||
| 7 | CFLAGS+= -DLIBRESSL_INTERNAL -Werror | ||
| 8 | |||
| 9 | .include <bsd.regress.mk> | ||
| diff --git a/src/regress/lib/libcrypto/mdc2/mdc2test.c b/src/regress/lib/libcrypto/mdc2/mdc2test.c deleted file mode 100644 index aa84a3a00b..0000000000 --- a/src/regress/lib/libcrypto/mdc2/mdc2test.c +++ /dev/null | |||
| @@ -1,123 +0,0 @@ | |||
| 1 | /* crypto/mdc2/mdc2test.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include <stdlib.h> | ||
| 61 | #include <string.h> | ||
| 62 | |||
| 63 | #include <openssl/evp.h> | ||
| 64 | #include <openssl/mdc2.h> | ||
| 65 | |||
| 66 | static unsigned char pad1[16]={ | ||
| 67 | 0x42,0xE5,0x0C,0xD2,0x24,0xBA,0xCE,0xBA, | ||
| 68 | 0x76,0x0B,0xDD,0x2B,0xD4,0x09,0x28,0x1A | ||
| 69 | }; | ||
| 70 | |||
| 71 | static unsigned char pad2[16]={ | ||
| 72 | 0x2E,0x46,0x79,0xB5,0xAD,0xD9,0xCA,0x75, | ||
| 73 | 0x35,0xD8,0x7A,0xFE,0xAB,0x33,0xBE,0xE2 | ||
| 74 | }; | ||
| 75 | |||
| 76 | int main(int argc, char *argv[]) | ||
| 77 | { | ||
| 78 | int ret=0; | ||
| 79 | unsigned char md[MDC2_DIGEST_LENGTH]; | ||
| 80 | int i; | ||
| 81 | EVP_MD_CTX c; | ||
| 82 | static char *text="Now is the time for all "; | ||
| 83 | |||
| 84 | EVP_MD_CTX_init(&c); | ||
| 85 | EVP_DigestInit_ex(&c,EVP_mdc2(), NULL); | ||
| 86 | EVP_DigestUpdate(&c,(unsigned char *)text,strlen(text)); | ||
| 87 | EVP_DigestFinal_ex(&c,&(md[0]),NULL); | ||
| 88 | |||
| 89 | if (memcmp(md,pad1,MDC2_DIGEST_LENGTH) != 0) | ||
| 90 | { | ||
| 91 | for (i=0; i<MDC2_DIGEST_LENGTH; i++) | ||
| 92 | printf("%02X",md[i]); | ||
| 93 | printf(" <- generated\n"); | ||
| 94 | for (i=0; i<MDC2_DIGEST_LENGTH; i++) | ||
| 95 | printf("%02X",pad1[i]); | ||
| 96 | printf(" <- correct\n"); | ||
| 97 | ret=1; | ||
| 98 | } | ||
| 99 | else | ||
| 100 | printf("pad1 - ok\n"); | ||
| 101 | |||
| 102 | EVP_DigestInit_ex(&c,EVP_mdc2(), NULL); | ||
| 103 | /* FIXME: use a ctl function? */ | ||
| 104 | ((MDC2_CTX *)c.md_data)->pad_type=2; | ||
| 105 | EVP_DigestUpdate(&c,(unsigned char *)text,strlen(text)); | ||
| 106 | EVP_DigestFinal_ex(&c,&(md[0]),NULL); | ||
| 107 | |||
| 108 | if (memcmp(md,pad2,MDC2_DIGEST_LENGTH) != 0) | ||
| 109 | { | ||
| 110 | for (i=0; i<MDC2_DIGEST_LENGTH; i++) | ||
| 111 | printf("%02X",md[i]); | ||
| 112 | printf(" <- generated\n"); | ||
| 113 | for (i=0; i<MDC2_DIGEST_LENGTH; i++) | ||
| 114 | printf("%02X",pad2[i]); | ||
| 115 | printf(" <- correct\n"); | ||
| 116 | ret=1; | ||
| 117 | } | ||
| 118 | else | ||
| 119 | printf("pad2 - ok\n"); | ||
| 120 | |||
| 121 | EVP_MD_CTX_cleanup(&c); | ||
| 122 | exit(ret); | ||
| 123 | } | ||
| diff --git a/src/usr.bin/openssl/openssl.1 b/src/usr.bin/openssl/openssl.1 index c90d998cb6..5106943640 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.14 2015/06/18 11:38:41 jmc Exp $ | 1 | .\" $OpenBSD: openssl.1,v 1.15 2015/06/20 01:07:25 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: June 18 2015 $ | 115 | .Dd $Mdocdate: June 20 2015 $ | 
| 116 | .Dt OPENSSL 1 | 116 | .Dt OPENSSL 1 | 
| 117 | .Os | 117 | .Os | 
| 118 | .Sh NAME | 118 | .Sh NAME | 
| @@ -389,8 +389,6 @@ GOST R 34.11-94 digest. | |||
| 389 | MD4 digest. | 389 | MD4 digest. | 
| 390 | .It Cm md5 | 390 | .It Cm md5 | 
| 391 | MD5 digest. | 391 | MD5 digest. | 
| 392 | .It Cm mdc2 | ||
| 393 | MDC-2 digest. | ||
| 394 | .It Cm ripemd160 | 392 | .It Cm ripemd160 | 
| 395 | RIPEMD-160 digest. | 393 | RIPEMD-160 digest. | 
| 396 | .It Cm sha | 394 | .It Cm sha | 
| @@ -1814,7 +1812,7 @@ install user certificates and CAs in MSIE using the Xenroll control. | |||
| 1814 | .Bk -words | 1812 | .Bk -words | 
| 1815 | .Oo | 1813 | .Oo | 
| 1816 | .Fl gost-mac | streebog256 | streebog512 | md_gost94 | | 1814 | .Fl gost-mac | streebog256 | streebog512 | md_gost94 | | 
| 1817 | .Fl md4 | md5 | mdc2 | ripemd160 | sha | sha1 | | 1815 | .Fl md4 | md5 | ripemd160 | sha | sha1 | | 
| 1818 | .Fl sha224 | sha256 | sha384 | sha512 | whirlpool | 1816 | .Fl sha224 | sha256 | sha384 | sha512 | whirlpool | 
| 1819 | .Oc | 1817 | .Oc | 
| 1820 | .Op Fl binary | 1818 | .Op Fl binary | 
| @@ -1838,7 +1836,7 @@ install user certificates and CAs in MSIE using the Xenroll control. | |||
| 1838 | .Pp | 1836 | .Pp | 
| 1839 | .Nm openssl | 1837 | .Nm openssl | 
| 1840 | .Cm gost-mac | streebog256 | streebog512 | md_gost94 | | 1838 | .Cm gost-mac | streebog256 | streebog512 | md_gost94 | | 
| 1841 | .Cm md4 | md5 | mdc2 | ripemd160 | sha | sha1 | | 1839 | .Cm md4 | md5 | ripemd160 | sha | sha1 | | 
| 1842 | .Cm sha224 | sha256 | sha384 | sha512 | whirlpool | 1840 | .Cm sha224 | sha256 | sha384 | sha512 | whirlpool | 
| 1843 | .Op Fl c | 1841 | .Op Fl c | 
| 1844 | .Op Fl d | 1842 | .Op Fl d | 
| diff --git a/src/usr.bin/openssl/req.c b/src/usr.bin/openssl/req.c index 1d50524052..93742971ff 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.4 2014/10/16 10:43:54 jsing Exp $ */ | 1 | /* $OpenBSD: req.c,v 1.5 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 | * | 
| @@ -379,7 +379,7 @@ bad: | |||
| 379 | BIO_printf(bio_err, " -newkey rsa:bits generate a new RSA key of 'bits' in size\n"); | 379 | BIO_printf(bio_err, " -newkey rsa:bits generate a new RSA key of 'bits' in size\n"); | 
| 380 | BIO_printf(bio_err, " -newkey dsa:file generate a new DSA key, parameters taken from CA in 'file'\n"); | 380 | BIO_printf(bio_err, " -newkey dsa:file generate a new DSA key, parameters taken from CA in 'file'\n"); | 
| 381 | BIO_printf(bio_err, " -newkey ec:file generate a new EC key, parameters taken from CA in 'file'\n"); | 381 | BIO_printf(bio_err, " -newkey ec:file generate a new EC key, parameters taken from CA in 'file'\n"); | 
| 382 | BIO_printf(bio_err, " -[digest] Digest to sign with (md5, sha1, md2, mdc2, md4)\n"); | 382 | BIO_printf(bio_err, " -[digest] Digest to sign with (md5, sha1, md4)\n"); | 
| 383 | BIO_printf(bio_err, " -config file request template file.\n"); | 383 | BIO_printf(bio_err, " -config file request template file.\n"); | 
| 384 | BIO_printf(bio_err, " -subj arg set or modify request subject\n"); | 384 | BIO_printf(bio_err, " -subj arg set or modify request subject\n"); | 
| 385 | BIO_printf(bio_err, " -multivalue-rdn enable support for multivalued RDNs\n"); | 385 | 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 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 | ||
| 181 | static const char *names[ALGOR_NUM] = { | 178 | static 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++) { | 
| diff --git a/src/usr.bin/openssl/ts.c b/src/usr.bin/openssl/ts.c index cd7d9cc81e..341d9395c7 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.3 2014/10/22 13:54:03 jsing Exp $ */ | 1 | /* $OpenBSD: ts.c,v 1.4 2015/06/20 01:07:25 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 | */ | 
| @@ -306,7 +306,7 @@ usage: | |||
| 306 | BIO_printf(bio_err, "usage:\n" | 306 | BIO_printf(bio_err, "usage:\n" | 
| 307 | "ts -query [-config configfile] " | 307 | "ts -query [-config configfile] " | 
| 308 | "[-data file_to_hash] [-digest digest_bytes]" | 308 | "[-data file_to_hash] [-digest digest_bytes]" | 
| 309 | "[-md2|-md4|-md5|-sha|-sha1|-mdc2|-ripemd160] " | 309 | "[-md2|-md4|-md5|-sha|-sha1|-ripemd160] " | 
| 310 | "[-policy object_id] [-no_nonce] [-cert] " | 310 | "[-policy object_id] [-no_nonce] [-cert] " | 
| 311 | "[-in request.tsq] [-out request.tsq] [-text]\n"); | 311 | "[-in request.tsq] [-out request.tsq] [-text]\n"); | 
| 312 | BIO_printf(bio_err, "or\n" | 312 | BIO_printf(bio_err, "or\n" | 
| diff --git a/src/usr.bin/openssl/x509.c b/src/usr.bin/openssl/x509.c index db3173e74d..0e4d7dcd77 100644 --- a/src/usr.bin/openssl/x509.c +++ b/src/usr.bin/openssl/x509.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: x509.c,v 1.2 2014/08/28 14:23:52 jsing Exp $ */ | 1 | /* $OpenBSD: x509.c,v 1.3 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 | * | 
| @@ -135,7 +135,7 @@ static const char *x509_usage[] = { | |||
| 135 | " -set_serial - serial number to use\n", | 135 | " -set_serial - serial number to use\n", | 
| 136 | " -text - print the certificate in text form\n", | 136 | " -text - print the certificate in text form\n", | 
| 137 | " -C - print out C code forms\n", | 137 | " -C - print out C code forms\n", | 
| 138 | " -md2/-md5/-sha1/-mdc2 - digest to use\n", | 138 | " -md2/-md5/-sha1 - digest to use\n", | 
| 139 | " -extfile - configuration file with X509V3 extensions to add\n", | 139 | " -extfile - configuration file with X509V3 extensions to add\n", | 
| 140 | " -extensions - section from config file with X509V3 extensions to add\n", | 140 | " -extensions - section from config file with X509V3 extensions to add\n", | 
| 141 | " -clrext - delete extensions before signing and input certificate\n", | 141 | " -clrext - delete extensions before signing and input certificate\n", | 
