diff options
Diffstat (limited to '')
-rw-r--r-- | src/lib/libcrypto/modes/cfb128.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/lib/libcrypto/modes/cfb128.c b/src/lib/libcrypto/modes/cfb128.c index 931353a620..9a63a46724 100644 --- a/src/lib/libcrypto/modes/cfb128.c +++ b/src/lib/libcrypto/modes/cfb128.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: cfb128.c,v 1.7 2023/07/08 14:56:54 beck Exp $ */ | 1 | /* $OpenBSD: cfb128.c,v 1.10 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 | * |
@@ -49,15 +49,11 @@ | |||
49 | * | 49 | * |
50 | */ | 50 | */ |
51 | 51 | ||
52 | #include <openssl/crypto.h> | ||
53 | #include "modes_local.h" | ||
54 | #include <string.h> | 52 | #include <string.h> |
55 | 53 | ||
56 | #ifndef MODES_DEBUG | 54 | #include <openssl/crypto.h> |
57 | # ifndef NDEBUG | 55 | |
58 | # define NDEBUG | 56 | #include "modes_local.h" |
59 | # endif | ||
60 | #endif | ||
61 | 57 | ||
62 | /* The input and output encrypted as though 128bit cfb mode is being | 58 | /* The input and output encrypted as though 128bit cfb mode is being |
63 | * used. The extra state information to record how much of the | 59 | * used. The extra state information to record how much of the |
@@ -75,7 +71,6 @@ CRYPTO_cfb128_encrypt(const unsigned char *in, unsigned char *out, | |||
75 | n = *num; | 71 | n = *num; |
76 | 72 | ||
77 | if (enc) { | 73 | if (enc) { |
78 | #if !defined(OPENSSL_SMALL_FOOTPRINT) | ||
79 | if (16 % sizeof(size_t) == 0) | 74 | if (16 % sizeof(size_t) == 0) |
80 | do { /* always true actually */ | 75 | do { /* always true actually */ |
81 | while (n && len) { | 76 | while (n && len) { |
@@ -111,7 +106,6 @@ CRYPTO_cfb128_encrypt(const unsigned char *in, unsigned char *out, | |||
111 | return; | 106 | return; |
112 | } while (0); | 107 | } while (0); |
113 | /* the rest would be commonly eliminated by x86* compiler */ | 108 | /* the rest would be commonly eliminated by x86* compiler */ |
114 | #endif | ||
115 | while (l < len) { | 109 | while (l < len) { |
116 | if (n == 0) { | 110 | if (n == 0) { |
117 | (*block)(ivec, ivec, key); | 111 | (*block)(ivec, ivec, key); |
@@ -122,7 +116,6 @@ CRYPTO_cfb128_encrypt(const unsigned char *in, unsigned char *out, | |||
122 | } | 116 | } |
123 | *num = n; | 117 | *num = n; |
124 | } else { | 118 | } else { |
125 | #if !defined(OPENSSL_SMALL_FOOTPRINT) | ||
126 | if (16 % sizeof(size_t) == 0) | 119 | if (16 % sizeof(size_t) == 0) |
127 | do { /* always true actually */ | 120 | do { /* always true actually */ |
128 | while (n && len) { | 121 | while (n && len) { |
@@ -163,7 +156,6 @@ CRYPTO_cfb128_encrypt(const unsigned char *in, unsigned char *out, | |||
163 | return; | 156 | return; |
164 | } while (0); | 157 | } while (0); |
165 | /* the rest would be commonly eliminated by x86* compiler */ | 158 | /* the rest would be commonly eliminated by x86* compiler */ |
166 | #endif | ||
167 | while (l < len) { | 159 | while (l < len) { |
168 | unsigned char c; | 160 | unsigned char c; |
169 | if (n == 0) { | 161 | if (n == 0) { |