summaryrefslogtreecommitdiffstats
path: root/openssl_err.cpp
diff options
context:
space:
mode:
authorShawn Willden <swillden@google.com>2015-07-10 14:03:14 -0600
committerShawn Willden <swillden@google.com>2015-07-14 10:48:29 -0600
commit7d05d88dc44b18e0350f7fe8d28c20f2f643bb80 (patch)
tree2cdc75cfb2a4b90db3ac562a891a60efbc75a7b1 /openssl_err.cpp
parent0d061c80d06f94291568e725f9eb649962a80352 (diff)
downloadandroid_system_keymaster-7d05d88dc44b18e0350f7fe8d28c20f2f643bb80.tar.gz
android_system_keymaster-7d05d88dc44b18e0350f7fe8d28c20f2f643bb80.tar.bz2
android_system_keymaster-7d05d88dc44b18e0350f7fe8d28c20f2f643bb80.zip
Use specified digest for RSA OAEP.
Bug: 22405614 Change-Id: Ia5eb67a571a9d46acca4b4e708bb8178bd3acd0d
Diffstat (limited to 'openssl_err.cpp')
-rw-r--r--openssl_err.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/openssl_err.cpp b/openssl_err.cpp
index 38edc05..2548d5c 100644
--- a/openssl_err.cpp
+++ b/openssl_err.cpp
@@ -145,6 +145,9 @@ keymaster_error_t TranslateX509v3Error(int reason) {
keymaster_error_t TranslateRsaError(int reason) {
switch (reason) {
+ case RSA_R_KEY_SIZE_TOO_SMALL:
+ LOG_W("RSA key is too small to use with selected padding/digest", 0);
+ return KM_ERROR_INCOMPATIBLE_PADDING_MODE;
case RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE:
case RSA_R_DATA_TOO_SMALL_FOR_KEY_SIZE:
return KM_ERROR_INVALID_INPUT_LENGTH;