diff options
author | deraadt <> | 2017-12-09 07:16:51 +0000 |
---|---|---|
committer | deraadt <> | 2017-12-09 07:16:51 +0000 |
commit | 7181944223368eb06c1423f5fcc1e06b662ed31b (patch) | |
tree | 0af67db2a16202d4424679e560eb63549c5bbafd /src/lib/libcrypto/modes | |
parent | 7731a237d1fae0a23ed50429d1c8dd4514f0cf66 (diff) | |
download | openbsd-7181944223368eb06c1423f5fcc1e06b662ed31b.tar.gz openbsd-7181944223368eb06c1423f5fcc1e06b662ed31b.tar.bz2 openbsd-7181944223368eb06c1423f5fcc1e06b662ed31b.zip |
In the middle of CRYPTO_gcm128_finish() there is a complicated #ifdef
block which defines a variable late, after code. Place this chunk into
a { subblock } to satisfy old compilers and old eyes.
Diffstat (limited to 'src/lib/libcrypto/modes')
-rw-r--r-- | src/lib/libcrypto/modes/gcm128.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/lib/libcrypto/modes/gcm128.c b/src/lib/libcrypto/modes/gcm128.c index 69b1dd4f49..42291519bc 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.20 2017/09/03 13:07:34 inoguchi Exp $ */ | 1 | /* $OpenBSD: gcm128.c,v 1.21 2017/12/09 07:16:51 deraadt 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 | * |
@@ -1515,13 +1515,15 @@ int CRYPTO_gcm128_finish(GCM128_CONTEXT *ctx,const unsigned char *tag, | |||
1515 | alen = BSWAP8(alen); | 1515 | alen = BSWAP8(alen); |
1516 | clen = BSWAP8(clen); | 1516 | clen = BSWAP8(clen); |
1517 | #else | 1517 | #else |
1518 | u8 *p = ctx->len.c; | 1518 | { |
1519 | u8 *p = ctx->len.c; | ||
1519 | 1520 | ||
1520 | ctx->len.u[0] = alen; | 1521 | ctx->len.u[0] = alen; |
1521 | ctx->len.u[1] = clen; | 1522 | ctx->len.u[1] = clen; |
1522 | 1523 | ||
1523 | alen = (u64)GETU32(p) <<32|GETU32(p+4); | 1524 | alen = (u64)GETU32(p) <<32|GETU32(p+4); |
1524 | clen = (u64)GETU32(p+8)<<32|GETU32(p+12); | 1525 | clen = (u64)GETU32(p+8)<<32|GETU32(p+12); |
1526 | } | ||
1525 | #endif | 1527 | #endif |
1526 | #endif | 1528 | #endif |
1527 | 1529 | ||