diff options
author | tb <> | 2023-05-07 14:38:04 +0000 |
---|---|---|
committer | tb <> | 2023-05-07 14:38:04 +0000 |
commit | d443381a60c6870ce47424635d20acd3c8867d14 (patch) | |
tree | d0e0bf9833573241e70ecc5f64b6213ac9d49acf | |
parent | 3851bf553d244753fee8990486c50b49b550251d (diff) | |
download | openbsd-d443381a60c6870ce47424635d20acd3c8867d14.tar.gz openbsd-d443381a60c6870ce47424635d20acd3c8867d14.tar.bz2 openbsd-d443381a60c6870ce47424635d20acd3c8867d14.zip |
xts128 mode: avoid two -Wshadow warnings in the BIG_ENDIAN code path.
Found by, compile tested & ok bluhm.
-rw-r--r-- | src/lib/libcrypto/modes/xts128.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/libcrypto/modes/xts128.c b/src/lib/libcrypto/modes/xts128.c index dfd3bc434e..71881227fb 100644 --- a/src/lib/libcrypto/modes/xts128.c +++ b/src/lib/libcrypto/modes/xts128.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: xts128.c,v 1.9 2022/11/26 16:08:53 tb Exp $ */ | 1 | /* $OpenBSD: xts128.c,v 1.10 2023/05/07 14:38:04 tb Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright (c) 2011 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 2011 The OpenSSL Project. All rights reserved. |
4 | * | 4 | * |
@@ -120,9 +120,9 @@ int CRYPTO_xts128_encrypt(const XTS128_CONTEXT *ctx, const unsigned char iv[16], | |||
120 | } | 120 | } |
121 | if (enc) { | 121 | if (enc) { |
122 | for (i=0;i<len;++i) { | 122 | for (i=0;i<len;++i) { |
123 | u8 c = inp[i]; | 123 | u8 ch = inp[i]; |
124 | out[i] = scratch.c[i]; | 124 | out[i] = scratch.c[i]; |
125 | scratch.c[i] = c; | 125 | scratch.c[i] = ch; |
126 | } | 126 | } |
127 | scratch.u[0] ^= tweak.u[0]; | 127 | scratch.u[0] ^= tweak.u[0]; |
128 | scratch.u[1] ^= tweak.u[1]; | 128 | scratch.u[1] ^= tweak.u[1]; |
@@ -165,9 +165,9 @@ int CRYPTO_xts128_encrypt(const XTS128_CONTEXT *ctx, const unsigned char iv[16], | |||
165 | scratch.u[1] ^= tweak1.u[1]; | 165 | scratch.u[1] ^= tweak1.u[1]; |
166 | 166 | ||
167 | for (i=0;i<len;++i) { | 167 | for (i=0;i<len;++i) { |
168 | u8 c = inp[16+i]; | 168 | u8 ch = inp[16+i]; |
169 | out[16+i] = scratch.c[i]; | 169 | out[16+i] = scratch.c[i]; |
170 | scratch.c[i] = c; | 170 | scratch.c[i] = ch; |
171 | } | 171 | } |
172 | scratch.u[0] ^= tweak.u[0]; | 172 | scratch.u[0] ^= tweak.u[0]; |
173 | scratch.u[1] ^= tweak.u[1]; | 173 | scratch.u[1] ^= tweak.u[1]; |