summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/modes/ctr128.c
diff options
context:
space:
mode:
authorjsing <>2025-04-23 10:09:08 +0000
committerjsing <>2025-04-23 10:09:08 +0000
commit273e048d695a49faad75ca2ffa6e445353142be8 (patch)
treed1c2ceba5dcba84401a9f27175cd75d24ed0522c /src/lib/libcrypto/modes/ctr128.c
parentfc19b6b60b2fc471fedda6057b5e1e5c20ccb6b8 (diff)
downloadopenbsd-273e048d695a49faad75ca2ffa6e445353142be8.tar.gz
openbsd-273e048d695a49faad75ca2ffa6e445353142be8.tar.bz2
openbsd-273e048d695a49faad75ca2ffa6e445353142be8.zip
Unifdef OPENSSL_SMALL_FOOTPRINT.
We do not build with OPENSSL_SMALL_FOOTPRINT and it removes more untested code paths. Request by tb@ (and it was already on my TODO list!)
Diffstat (limited to 'src/lib/libcrypto/modes/ctr128.c')
-rw-r--r--src/lib/libcrypto/modes/ctr128.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/lib/libcrypto/modes/ctr128.c b/src/lib/libcrypto/modes/ctr128.c
index 6d1bcff313..30563ed6e3 100644
--- a/src/lib/libcrypto/modes/ctr128.c
+++ b/src/lib/libcrypto/modes/ctr128.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ctr128.c,v 1.16 2025/04/22 14:08:24 jsing Exp $ */ 1/* $OpenBSD: ctr128.c,v 1.17 2025/04/23 10:09:08 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 2008 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 2008 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -76,7 +76,6 @@ ctr128_inc(unsigned char *counter)
76 } while (n); 76 } while (n);
77} 77}
78 78
79#if !defined(OPENSSL_SMALL_FOOTPRINT)
80static void 79static void
81ctr128_inc_aligned(unsigned char *counter) 80ctr128_inc_aligned(unsigned char *counter)
82{ 81{
@@ -96,7 +95,6 @@ ctr128_inc_aligned(unsigned char *counter)
96 } while (n); 95 } while (n);
97#endif 96#endif
98} 97}
99#endif
100 98
101/* The input encrypted as though 128bit counter mode is being 99/* The input encrypted as though 128bit counter mode is being
102 * used. The extra state information to record how much of the 100 * used. The extra state information to record how much of the
@@ -122,7 +120,6 @@ CRYPTO_ctr128_encrypt(const unsigned char *in, unsigned char *out,
122 120
123 OPENSSL_assert(n < 16); 121 OPENSSL_assert(n < 16);
124 122
125#if !defined(OPENSSL_SMALL_FOOTPRINT)
126 if (16 % sizeof(size_t) == 0) 123 if (16 % sizeof(size_t) == 0)
127 do { /* always true actually */ 124 do { /* always true actually */
128 while (n && len) { 125 while (n && len) {
@@ -160,7 +157,6 @@ CRYPTO_ctr128_encrypt(const unsigned char *in, unsigned char *out,
160 return; 157 return;
161 } while (0); 158 } while (0);
162 /* the rest would be commonly eliminated by x86* compiler */ 159 /* the rest would be commonly eliminated by x86* compiler */
163#endif
164 while (l < len) { 160 while (l < len) {
165 if (n == 0) { 161 if (n == 0) {
166 (*block)(ivec, ecount_buf, key); 162 (*block)(ivec, ecount_buf, key);