summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/rsa/rsa_sign.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/rsa/rsa_sign.c')
-rw-r--r--src/lib/libcrypto/rsa/rsa_sign.c17
1 files changed, 1 insertions, 16 deletions
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))