Fix Solaris compile errors in provider ciphers
authorShane Lontis <shane.lontis@oracle.com>
Thu, 19 Sep 2019 11:21:39 +0000 (21:21 +1000)
committerShane Lontis <shane.lontis@oracle.com>
Thu, 19 Sep 2019 11:21:39 +0000 (21:21 +1000)
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9941)

providers/common/ciphers/cipher_aes_hw_t4.inc
providers/common/ciphers/cipher_tdes_hw.c

index 8722fa0add118deb645ea461e742dd5fd4f343b2..21b672710a1522cbb047a0b8b94e0182d7d6c5a0 100644 (file)
@@ -92,4 +92,4 @@ static const PROV_CIPHER_HW aes_t4_##mode = {                                  \
 };
 #define PROV_CIPHER_HW_select(mode)                                            \
     if (SPARC_AES_CAPABLE)                                                     \
-        return aes_t4_##mode;
+        return &aes_t4_##mode;
index 980201267ba436274baf5898cd326f45f073af2c..92b6de24220ff0a272155999bc73663c3dd5c5b4 100644 (file)
@@ -27,8 +27,8 @@ int cipher_hw_tdes_ede3_initkey(PROV_CIPHER_CTX *ctx, const unsigned char *key,
             des_t4_key_expand(&deskey[0], &tctx->ks1);
             des_t4_key_expand(&deskey[1], &tctx->ks2);
             des_t4_key_expand(&deskey[2], &tctx->ks3);
-            dat->tstream.cbc = enc ? des_t4_ede3_cbc_encrypt :
-                                     des_t4_ede3_cbc_decrypt;
+            tctx->tstream.cbc = ctx->enc ? des_t4_ede3_cbc_encrypt :
+                                           des_t4_ede3_cbc_decrypt;
             return 1;
         }
     }