diff options
author | jsing <> | 2025-04-25 12:08:53 +0000 |
---|---|---|
committer | jsing <> | 2025-04-25 12:08:53 +0000 |
commit | 0aab45657f4c617cb7e482a6b1e8ab0103e3f7f6 (patch) | |
tree | 5bc660880b7cdd08ef3f28c19cab2e57bb56455a /src | |
parent | 79defe1af079a23331fecc0ed116867611eee476 (diff) | |
download | openbsd-0aab45657f4c617cb7e482a6b1e8ab0103e3f7f6.tar.gz openbsd-0aab45657f4c617cb7e482a6b1e8ab0103e3f7f6.tar.bz2 openbsd-0aab45657f4c617cb7e482a6b1e8ab0103e3f7f6.zip |
Restore two #if defined(GHASH) that were incorrectly removed.
Also condition on defined(GHASH_CHUNK) since this is used within these
blocks. This makes the conditionals consistent with other usage.
Fixes build with TABLE_BITS == 1.
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/modes/gcm128.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/libcrypto/modes/gcm128.c b/src/lib/libcrypto/modes/gcm128.c index 1e925f2a1f..21ba9eef57 100644 --- a/src/lib/libcrypto/modes/gcm128.c +++ b/src/lib/libcrypto/modes/gcm128.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: gcm128.c,v 1.34 2025/04/25 08:26:57 jsing Exp $ */ | 1 | /* $OpenBSD: gcm128.c,v 1.35 2025/04/25 12:08:53 jsing Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright (c) 2010 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 2010 The OpenSSL Project. All rights reserved. |
4 | * | 4 | * |
@@ -1093,7 +1093,7 @@ CRYPTO_gcm128_encrypt_ctr32(GCM128_CONTEXT *ctx, | |||
1093 | return 0; | 1093 | return 0; |
1094 | } | 1094 | } |
1095 | } | 1095 | } |
1096 | 1096 | #if defined(GHASH) && defined(GHASH_CHUNK) | |
1097 | while (len >= GHASH_CHUNK) { | 1097 | while (len >= GHASH_CHUNK) { |
1098 | (*stream)(in, out, GHASH_CHUNK/16, key, ctx->Yi.c); | 1098 | (*stream)(in, out, GHASH_CHUNK/16, key, ctx->Yi.c); |
1099 | ctr += GHASH_CHUNK/16; | 1099 | ctr += GHASH_CHUNK/16; |
@@ -1103,7 +1103,7 @@ CRYPTO_gcm128_encrypt_ctr32(GCM128_CONTEXT *ctx, | |||
1103 | in += GHASH_CHUNK; | 1103 | in += GHASH_CHUNK; |
1104 | len -= GHASH_CHUNK; | 1104 | len -= GHASH_CHUNK; |
1105 | } | 1105 | } |
1106 | 1106 | #endif | |
1107 | if ((i = (len & (size_t)-16))) { | 1107 | if ((i = (len & (size_t)-16))) { |
1108 | size_t j = i/16; | 1108 | size_t j = i/16; |
1109 | 1109 | ||
@@ -1185,7 +1185,7 @@ CRYPTO_gcm128_decrypt_ctr32(GCM128_CONTEXT *ctx, | |||
1185 | return 0; | 1185 | return 0; |
1186 | } | 1186 | } |
1187 | } | 1187 | } |
1188 | 1188 | #if defined(GHASH) && defined(GHASH_CHUNK) | |
1189 | while (len >= GHASH_CHUNK) { | 1189 | while (len >= GHASH_CHUNK) { |
1190 | GHASH(ctx, in, GHASH_CHUNK); | 1190 | GHASH(ctx, in, GHASH_CHUNK); |
1191 | (*stream)(in, out, GHASH_CHUNK/16, key, ctx->Yi.c); | 1191 | (*stream)(in, out, GHASH_CHUNK/16, key, ctx->Yi.c); |
@@ -1195,7 +1195,7 @@ CRYPTO_gcm128_decrypt_ctr32(GCM128_CONTEXT *ctx, | |||
1195 | in += GHASH_CHUNK; | 1195 | in += GHASH_CHUNK; |
1196 | len -= GHASH_CHUNK; | 1196 | len -= GHASH_CHUNK; |
1197 | } | 1197 | } |
1198 | 1198 | #endif | |
1199 | if ((i = (len & (size_t)-16))) { | 1199 | if ((i = (len & (size_t)-16))) { |
1200 | size_t j = i/16; | 1200 | size_t j = i/16; |
1201 | 1201 | ||