summaryrefslogtreecommitdiffstats
path: root/crypto/modes/gcm128.c
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2015-01-25 14:51:43 +0100
committerAndy Polyakov <appro@openssl.org>2015-01-30 16:36:27 +0100
commitb2991c081aba5351a3386bdde2927672d53e5c99 (patch)
tree2f5c36a35cf1520fe16100a7ee1f7d26fea34b04 /crypto/modes/gcm128.c
parent4938ebc4067ae74e07e88b25cd22fd8adf6b8ddc (diff)
modes/gcm128.c: fix OPENSSL_SMALL_FOOTPRINT compile failure
on affected platforms (PowerPC and AArch64). For reference, minimalistic #ifdef GHASH is sufficient, because it's never defined with OPENSSL_SMALL_FOOTPRINT and ctx->ghash is never referred. Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/modes/gcm128.c')
-rw-r--r--crypto/modes/gcm128.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/crypto/modes/gcm128.c b/crypto/modes/gcm128.c
index 75556dcb16..b5ae9ae9b8 100644
--- a/crypto/modes/gcm128.c
+++ b/crypto/modes/gcm128.c
@@ -850,7 +850,11 @@ void CRYPTO_gcm128_init(GCM128_CONTEXT *ctx, void *key, block128_f block)
{
gcm_init_4bit(ctx->Htable, ctx->H.u);
ctx->gmult = gcm_gmult_4bit;
+# if defined(GHASH)
ctx->ghash = gcm_ghash_4bit;
+# else
+ ctx->ghash = NULL;
+# endif
}
# elif defined(GHASH_ASM_SPARC)
if (OPENSSL_sparcv9cap_P[0] & SPARCV9_VIS3) {
@@ -870,7 +874,11 @@ void CRYPTO_gcm128_init(GCM128_CONTEXT *ctx, void *key, block128_f block)
} else {
gcm_init_4bit(ctx->Htable, ctx->H.u);
ctx->gmult = gcm_gmult_4bit;
+# if defined(GHASH)
ctx->ghash = gcm_ghash_4bit;
+# else
+ ctx->ghash = NULL;
+# endif
}
# else
gcm_init_4bit(ctx->Htable, ctx->H.u);