summaryrefslogtreecommitdiffstats
path: root/crypto/asymmetric_keys/rsa.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-11-29 16:48:22 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-11-29 16:48:22 -0800
commit45b4539309d82ae04e6ed7de494ae194ca0755aa (patch)
tree2ee6f8118fbce7cf8dafbb3ebd2baf69c065769d /crypto/asymmetric_keys/rsa.c
parent44c3eea650001d85f6adc951b6cd6f2e6fe7a155 (diff)
parentdc1ccc48159d63eca5089e507c82c7d22ef60839 (diff)
downloadlinux-45b4539309d82ae04e6ed7de494ae194ca0755aa.tar.bz2
Merge 3.13-rc2 into driver-core-next
We want those fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'crypto/asymmetric_keys/rsa.c')
-rw-r--r--crypto/asymmetric_keys/rsa.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/crypto/asymmetric_keys/rsa.c b/crypto/asymmetric_keys/rsa.c
index 90a17f59ba28..459cf97a75e2 100644
--- a/crypto/asymmetric_keys/rsa.c
+++ b/crypto/asymmetric_keys/rsa.c
@@ -13,6 +13,7 @@
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/slab.h>
+#include <crypto/algapi.h>
#include "public_key.h"
MODULE_LICENSE("GPL");
@@ -189,12 +190,12 @@ static int RSA_verify(const u8 *H, const u8 *EM, size_t k, size_t hash_size,
}
}
- if (memcmp(asn1_template, EM + T_offset, asn1_size) != 0) {
+ if (crypto_memneq(asn1_template, EM + T_offset, asn1_size) != 0) {
kleave(" = -EBADMSG [EM[T] ASN.1 mismatch]");
return -EBADMSG;
}
- if (memcmp(H, EM + T_offset + asn1_size, hash_size) != 0) {
+ if (crypto_memneq(H, EM + T_offset + asn1_size, hash_size) != 0) {
kleave(" = -EKEYREJECTED [EM[T] hash mismatch]");
return -EKEYREJECTED;
}