summaryrefslogtreecommitdiffstats
path: root/rsa_operation.cpp
diff options
context:
space:
mode:
authorShawn Willden <swillden@google.com>2015-05-09 12:48:16 +0000
committerShawn Willden <swillden@google.com>2015-05-09 12:48:16 +0000
commit197d9af98df67eaf777d149df22c8eeead8511b1 (patch)
treea25d2704bf832d7090b09569bdb7bbe6cebfbf43 /rsa_operation.cpp
parent4749c43a3b4f48be951924fb473e1fcd0279c508 (diff)
downloadandroid_system_keymaster-197d9af98df67eaf777d149df22c8eeead8511b1.tar.gz
android_system_keymaster-197d9af98df67eaf777d149df22c8eeead8511b1.tar.bz2
android_system_keymaster-197d9af98df67eaf777d149df22c8eeead8511b1.zip
Revert "Use CRYPTO_memcmp from OpenSSL rather than memcmp_s."
This created a build breakage in Trusty, and so was reverted in AOSP. Reverting here to sync. This reverts commit 4749c43a3b4f48be951924fb473e1fcd0279c508. Change-Id: I9473f58ace295d9454693759c88c85fe9f70ae01
Diffstat (limited to 'rsa_operation.cpp')
-rw-r--r--rsa_operation.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/rsa_operation.cpp b/rsa_operation.cpp
index a5ad6f7..df07747 100644
--- a/rsa_operation.cpp
+++ b/rsa_operation.cpp
@@ -19,7 +19,6 @@
#include <limits.h>
#include <openssl/err.h>
-#include <openssl/mem.h>
#include <keymaster/logger.h>
@@ -459,7 +458,7 @@ keymaster_error_t RsaVerifyOperation::DecryptAndMatch(const Buffer& signature,
RSA_verify_PKCS1_PSS_mgf1(rsa_key_, to_match, digest_algorithm_, NULL, decrypted_data.get(),
-2 /* salt length recovered from signature */))
return KM_ERROR_OK;
- else if (padding_ != KM_PAD_RSA_PSS && CRYPTO_memcmp(decrypted_data.get(), to_match, len) == 0)
+ else if (padding_ != KM_PAD_RSA_PSS && memcmp_s(decrypted_data.get(), to_match, len) == 0)
return KM_ERROR_OK;
return KM_ERROR_VERIFICATION_FAILED;