diff options
-rw-r--r-- | crypto/modes/build.info | 5 | ||||
-rw-r--r-- | include/crypto/aes_platform.h | 12 |
2 files changed, 11 insertions, 6 deletions
diff --git a/crypto/modes/build.info b/crypto/modes/build.info index 792fff67b7..e926e4030d 100644 --- a/crypto/modes/build.info +++ b/crypto/modes/build.info @@ -32,7 +32,10 @@ IF[{- !$disabled{asm} -}] $MODESASM_parisc20_64=$MODESASM_parisc11 $MODESDEF_parisc20_64=$MODESDEF_parisc11 - $MODESASM_ppc32=ghashp8-ppc.s aes-gcm-ppc.s + $MODESASM_ppc32=ghashp8-ppc.s + IF[{- $target{sys_id} ne "AIX" -}] + $MODESASM_ppc32=ghashp8-ppc.s aes-gcm-ppc.s + ENDIF $MODESDEF_ppc32= $MODESASM_ppc64=$MODESASM_ppc32 $MODESDEF_ppc64=$MODESDEF_ppc32 diff --git a/include/crypto/aes_platform.h b/include/crypto/aes_platform.h index beb679fac7..8159f2a092 100644 --- a/include/crypto/aes_platform.h +++ b/include/crypto/aes_platform.h @@ -74,18 +74,20 @@ void AES_xts_decrypt(const unsigned char *inp, unsigned char *out, size_t len, # define HWAES_ctr32_encrypt_blocks aes_p8_ctr32_encrypt_blocks # define HWAES_xts_encrypt aes_p8_xts_encrypt # define HWAES_xts_decrypt aes_p8_xts_decrypt -# define PPC_AES_GCM_CAPABLE (OPENSSL_ppccap_P & PPC_MADD300) -# define AES_GCM_ENC_BYTES 128 -# define AES_GCM_DEC_BYTES 128 +# ifndef OPENSSL_SYS_AIX +# define PPC_AES_GCM_CAPABLE (OPENSSL_ppccap_P & PPC_MADD300) +# define AES_GCM_ENC_BYTES 128 +# define AES_GCM_DEC_BYTES 128 size_t ppc_aes_gcm_encrypt(const unsigned char *in, unsigned char *out, size_t len, const void *key, unsigned char ivec[16], u64 *Xi); size_t ppc_aes_gcm_decrypt(const unsigned char *in, unsigned char *out, size_t len, const void *key, unsigned char ivec[16], u64 *Xi); -# define AES_GCM_ASM_PPC(gctx) ((gctx)->ctr==aes_p8_ctr32_encrypt_blocks && \ - (gctx)->gcm.funcs.ghash==gcm_ghash_p8) +# define AES_GCM_ASM_PPC(gctx) ((gctx)->ctr==aes_p8_ctr32_encrypt_blocks && \ + (gctx)->gcm.funcs.ghash==gcm_ghash_p8) void gcm_ghash_p8(u64 Xi[2],const u128 Htable[16],const u8 *inp, size_t len); +# endif /* OPENSSL_SYS_AIX */ # endif /* PPC */ # if (defined(__arm__) || defined(__arm) || defined(__aarch64__)) |