s390x assembly pack: fix various aes modes performance regression
authorPatrick Steuer <patrick.steuer@de.ibm.com>
Fri, 28 Jun 2019 20:08:16 +0000 (22:08 +0200)
committerPatrick Steuer <patrick.steuer@de.ibm.com>
Tue, 2 Jul 2019 15:33:29 +0000 (17:33 +0200)
which was introduced with 64adf9aac7.

Signed-off-by: Patrick Steuer <patrick.steuer@de.ibm.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/9271)

providers/common/ciphers/aes_basic.c

index 0f64296..619386c 100644 (file)
@@ -606,9 +606,9 @@ static const PROV_AES_CIPHER aes_##mode = { \
 }; \
 const PROV_AES_CIPHER *PROV_AES_CIPHER_##mode(size_t keylen) \
 {   \
-    if ((keylen == 128 && S390X_aes_128_##mode##_CAPABLE)           \
-            || (keylen == 192 && S390X_aes_192_##mode##_CAPABLE)    \
-            || (keylen == 256 && S390X_aes_256_##mode##_CAPABLE))   \
+    if ((keylen == 16 && S390X_aes_128_##mode##_CAPABLE)           \
+            || (keylen == 24 && S390X_aes_192_##mode##_CAPABLE)    \
+            || (keylen == 32 && S390X_aes_256_##mode##_CAPABLE))   \
         return &s390x_aes_##mode;   \
     \
     return &aes_##mode; \