diff options
Diffstat (limited to 'src/lib/libcrypto/rsa/rsa_sign.c')
| -rw-r--r-- | src/lib/libcrypto/rsa/rsa_sign.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_sign.c b/src/lib/libcrypto/rsa/rsa_sign.c index 8a1e642183..cee09eccb1 100644 --- a/src/lib/libcrypto/rsa/rsa_sign.c +++ b/src/lib/libcrypto/rsa/rsa_sign.c | |||
| @@ -169,7 +169,7 @@ int RSA_verify(int dtype, const unsigned char *m, unsigned int m_len, | |||
| 169 | } | 169 | } |
| 170 | if((dtype == NID_md5_sha1) && (m_len != SSL_SIG_LENGTH) ) { | 170 | if((dtype == NID_md5_sha1) && (m_len != SSL_SIG_LENGTH) ) { |
| 171 | RSAerr(RSA_F_RSA_VERIFY,RSA_R_INVALID_MESSAGE_LENGTH); | 171 | RSAerr(RSA_F_RSA_VERIFY,RSA_R_INVALID_MESSAGE_LENGTH); |
| 172 | return(0); | 172 | goto err; |
| 173 | } | 173 | } |
| 174 | i=RSA_public_decrypt((int)siglen,sigbuf,s,rsa,RSA_PKCS1_PADDING); | 174 | i=RSA_public_decrypt((int)siglen,sigbuf,s,rsa,RSA_PKCS1_PADDING); |
| 175 | 175 | ||
| @@ -222,8 +222,11 @@ int RSA_verify(int dtype, const unsigned char *m, unsigned int m_len, | |||
| 222 | } | 222 | } |
| 223 | err: | 223 | err: |
| 224 | if (sig != NULL) X509_SIG_free(sig); | 224 | if (sig != NULL) X509_SIG_free(sig); |
| 225 | OPENSSL_cleanse(s,(unsigned int)siglen); | 225 | if (s != NULL) |
| 226 | OPENSSL_free(s); | 226 | { |
| 227 | OPENSSL_cleanse(s,(unsigned int)siglen); | ||
| 228 | OPENSSL_free(s); | ||
| 229 | } | ||
| 227 | return(ret); | 230 | return(ret); |
| 228 | } | 231 | } |
| 229 | 232 | ||
