diff options
Diffstat (limited to 'src/lib/libcrypto/rsa')
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_oaep.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_oaep.c b/src/lib/libcrypto/rsa/rsa_oaep.c index 8585d7c3aa..86e2bfc34f 100644 --- a/src/lib/libcrypto/rsa/rsa_oaep.c +++ b/src/lib/libcrypto/rsa/rsa_oaep.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rsa_oaep.c,v 1.24 2014/10/22 13:02:04 jsing Exp $ */ | 1 | /* $OpenBSD: rsa_oaep.c,v 1.25 2015/06/20 12:01:14 jsing Exp $ */ |
2 | /* Written by Ulf Moeller. This software is distributed on an "AS IS" | 2 | /* Written by Ulf Moeller. This software is distributed on an "AS IS" |
3 | basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. */ | 3 | basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. */ |
4 | 4 | ||
@@ -154,7 +154,7 @@ RSA_padding_check_PKCS1_OAEP(unsigned char *to, int tlen, | |||
154 | if (!EVP_Digest((void *)param, plen, phash, NULL, EVP_sha1(), NULL)) | 154 | if (!EVP_Digest((void *)param, plen, phash, NULL, EVP_sha1(), NULL)) |
155 | return -1; | 155 | return -1; |
156 | 156 | ||
157 | if (CRYPTO_memcmp(db, phash, SHA_DIGEST_LENGTH) != 0 || bad) | 157 | if (timingsafe_memcmp(db, phash, SHA_DIGEST_LENGTH) != 0 || bad) |
158 | goto decoding_err; | 158 | goto decoding_err; |
159 | else { | 159 | else { |
160 | for (i = SHA_DIGEST_LENGTH; i < dblen; i++) | 160 | for (i = SHA_DIGEST_LENGTH; i < dblen; i++) |