diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2015-12-03 17:22:58 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2015-12-03 17:22:58 +0000 |
commit | 737d7e8d3945c206c037e139055821aa0c64bb8e (patch) | |
tree | b0284af4e4144e27eb9f39e88c53868060774b16 /crypto/rsa/rsa_sign.c | |
parent | e9fcefce9bb70f20c272a996443928c5f6ab8cd8 (diff) |
Diffstat (limited to 'crypto/rsa/rsa_sign.c')
-rw-r--r-- | crypto/rsa/rsa_sign.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/crypto/rsa/rsa_sign.c b/crypto/rsa/rsa_sign.c index 19461c6364d43..82ca8324dfbc1 100644 --- a/crypto/rsa/rsa_sign.c +++ b/crypto/rsa/rsa_sign.c @@ -218,14 +218,13 @@ int int_rsa_verify(int dtype, const unsigned char *m, memcpy(rm, s + 2, 16); *prm_len = 16; ret = 1; - } else if (memcmp(m, s + 2, 16)) + } else if (memcmp(m, s + 2, 16)) { RSAerr(RSA_F_INT_RSA_VERIFY, RSA_R_BAD_SIGNATURE); - else + } else { ret = 1; - } - - /* Special case: SSL signature */ - if (dtype == NID_md5_sha1) { + } + } else if (dtype == NID_md5_sha1) { + /* Special case: SSL signature */ if ((i != SSL_SIG_LENGTH) || memcmp(s, m, SSL_SIG_LENGTH)) RSAerr(RSA_F_INT_RSA_VERIFY, RSA_R_BAD_SIGNATURE); else |