diff options
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_sign.c | 17 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/rsa/rsa_sign.c | 17 |
2 files changed, 6 insertions, 28 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_sign.c b/src/lib/libcrypto/rsa/rsa_sign.c index 239435fe91..9718589be7 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.18 2014/07/09 08:20:08 miod Exp $ */ | 1 | /* $OpenBSD: rsa_sign.c,v 1.19 2014/07/09 09:04:14 miod 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 | * |
@@ -223,19 +223,8 @@ int_rsa_verify(int dtype, const unsigned char *m, unsigned int m_len, | |||
223 | sigtype = OBJ_obj2nid(sig->algor->algorithm); | 223 | sigtype = OBJ_obj2nid(sig->algor->algorithm); |
224 | 224 | ||
225 | if (sigtype != dtype) { | 225 | if (sigtype != dtype) { |
226 | if ((dtype == NID_md5 && | 226 | RSAerr(RSA_F_INT_RSA_VERIFY, RSA_R_ALGORITHM_MISMATCH); |
227 | sigtype == NID_md5WithRSAEncryption) || | 227 | goto err; |
228 | (dtype == NID_md2 && | ||
229 | sigtype == NID_md2WithRSAEncryption)) { | ||
230 | /* ok, we will let it through */ | ||
231 | fprintf(stderr, | ||
232 | "signature has problems, " | ||
233 | "re-make with post SSLeay045\n"); | ||
234 | } else { | ||
235 | RSAerr(RSA_F_INT_RSA_VERIFY, | ||
236 | RSA_R_ALGORITHM_MISMATCH); | ||
237 | goto err; | ||
238 | } | ||
239 | } | 228 | } |
240 | if (rm) { | 229 | if (rm) { |
241 | const EVP_MD *md; | 230 | const EVP_MD *md; |
diff --git a/src/lib/libssl/src/crypto/rsa/rsa_sign.c b/src/lib/libssl/src/crypto/rsa/rsa_sign.c index 239435fe91..9718589be7 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.18 2014/07/09 08:20:08 miod Exp $ */ | 1 | /* $OpenBSD: rsa_sign.c,v 1.19 2014/07/09 09:04:14 miod 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 | * |
@@ -223,19 +223,8 @@ int_rsa_verify(int dtype, const unsigned char *m, unsigned int m_len, | |||
223 | sigtype = OBJ_obj2nid(sig->algor->algorithm); | 223 | sigtype = OBJ_obj2nid(sig->algor->algorithm); |
224 | 224 | ||
225 | if (sigtype != dtype) { | 225 | if (sigtype != dtype) { |
226 | if ((dtype == NID_md5 && | 226 | RSAerr(RSA_F_INT_RSA_VERIFY, RSA_R_ALGORITHM_MISMATCH); |
227 | sigtype == NID_md5WithRSAEncryption) || | 227 | goto err; |
228 | (dtype == NID_md2 && | ||
229 | sigtype == NID_md2WithRSAEncryption)) { | ||
230 | /* ok, we will let it through */ | ||
231 | fprintf(stderr, | ||
232 | "signature has problems, " | ||
233 | "re-make with post SSLeay045\n"); | ||
234 | } else { | ||
235 | RSAerr(RSA_F_INT_RSA_VERIFY, | ||
236 | RSA_R_ALGORITHM_MISMATCH); | ||
237 | goto err; | ||
238 | } | ||
239 | } | 228 | } |
240 | if (rm) { | 229 | if (rm) { |
241 | const EVP_MD *md; | 230 | const EVP_MD *md; |