diff options
author | 2015-06-20 01:07:24 +0000 | |
---|---|---|
committer | 2015-06-20 01:07:24 +0000 | |
commit | b9b6a34e8e25df3fd344b18bf149e1e84e68918e (patch) | |
tree | 288ba40a74fde33646faaf9d6dc043efef906b2c /lib/libcrypto/rsa | |
parent | Tweak whitespace and remove dangling, unneeded "else". (diff) | |
download | wireguard-openbsd-b9b6a34e8e25df3fd344b18bf149e1e84e68918e.tar.xz wireguard-openbsd-b9b6a34e8e25df3fd344b18bf149e1e84e68918e.zip |
Remove obsolete MDC-2DES from libcrypto.
ok deraadt@ jsing@ miod@
Diffstat (limited to 'lib/libcrypto/rsa')
-rw-r--r-- | lib/libcrypto/rsa/rsa_pmeth.c | 15 | ||||
-rw-r--r-- | lib/libcrypto/rsa/rsa_sign.c | 17 |
2 files changed, 3 insertions, 29 deletions
diff --git a/lib/libcrypto/rsa/rsa_pmeth.c b/lib/libcrypto/rsa/rsa_pmeth.c index 09166e105b7..0b648138ee8 100644 --- a/lib/libcrypto/rsa/rsa_pmeth.c +++ b/lib/libcrypto/rsa/rsa_pmeth.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsa_pmeth.c,v 1.16 2015/02/11 04:05:14 beck Exp $ */ +/* $OpenBSD: rsa_pmeth.c,v 1.17 2015/06/20 01:07:25 doug Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2006. */ @@ -178,18 +178,7 @@ pkey_rsa_sign(EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen, return -1; } - if (EVP_MD_type(rctx->md) == NID_mdc2) { - unsigned int sltmp; - - if (rctx->pad_mode != RSA_PKCS1_PADDING) - return -1; - ret = RSA_sign_ASN1_OCTET_STRING(NID_mdc2, tbs, tbslen, - sig, &sltmp, rsa); - - if (ret <= 0) - return ret; - ret = sltmp; - } else if (rctx->pad_mode == RSA_X931_PADDING) { + if (rctx->pad_mode == RSA_X931_PADDING) { if (!setup_tbuf(rctx, ctx)) return -1; memcpy(rctx->tbuf, tbs, tbslen); diff --git a/lib/libcrypto/rsa/rsa_sign.c b/lib/libcrypto/rsa/rsa_sign.c index a446b563b32..09d8ef329db 100644 --- a/lib/libcrypto/rsa/rsa_sign.c +++ b/lib/libcrypto/rsa/rsa_sign.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsa_sign.c,v 1.22 2014/07/11 08:44:49 jsing Exp $ */ +/* $OpenBSD: rsa_sign.c,v 1.23 2015/06/20 01:07:25 doug Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -180,21 +180,6 @@ int_rsa_verify(int dtype, const unsigned char *m, unsigned int m_len, if (i <= 0) goto err; - /* - * Oddball MDC2 case: signature can be OCTET STRING. - * check for correct tag and length octets. - */ - if (dtype == NID_mdc2 && i == 18 && s[0] == 0x04 && s[1] == 0x10) { - if (rm) { - memcpy(rm, s + 2, 16); - *prm_len = 16; - ret = 1; - } else if (memcmp(m, s + 2, 16)) - RSAerr(RSA_F_INT_RSA_VERIFY, RSA_R_BAD_SIGNATURE); - else - ret = 1; - } - /* Special case: SSL signature */ if (dtype == NID_md5_sha1) { if (i != SSL_SIG_LENGTH || memcmp(s, m, SSL_SIG_LENGTH)) |