Skip to content

Commit

Permalink
modes/gcm128.c: fix OPENSSL_SMALL_FOOTPRINT compile failure
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andy Polyakov committed Jan 30, 2015
1 parent 4938ebc commit b2991c0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions crypto/modes/gcm128.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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);
Expand Down

0 comments on commit b2991c0

Please sign in to comment.