summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/evp/c_allc.c
diff options
context:
space:
mode:
authorjsing <>2014-05-07 17:42:51 +0000
committerjsing <>2014-05-07 17:42:51 +0000
commitdd9b16d5489a1196ae0fcbe4315fe0122b042d7d (patch)
treeb341b2cdc0818410f55d0a4662a40677e4899326 /src/lib/libcrypto/evp/c_allc.c
parent1b7393e13080fa69e951cc4f482e3d5d85639c70 (diff)
downloadopenbsd-dd9b16d5489a1196ae0fcbe4315fe0122b042d7d.tar.gz
openbsd-dd9b16d5489a1196ae0fcbe4315fe0122b042d7d.tar.bz2
openbsd-dd9b16d5489a1196ae0fcbe4315fe0122b042d7d.zip
KNF.
Diffstat (limited to 'src/lib/libcrypto/evp/c_allc.c')
-rw-r--r--src/lib/libcrypto/evp/c_allc.c85
1 files changed, 43 insertions, 42 deletions
diff --git a/src/lib/libcrypto/evp/c_allc.c b/src/lib/libcrypto/evp/c_allc.c
index 2047b6cd61..91ad980182 100644
--- a/src/lib/libcrypto/evp/c_allc.c
+++ b/src/lib/libcrypto/evp/c_allc.c
@@ -5,21 +5,21 @@
5 * This package is an SSL implementation written 5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com). 6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL. 7 * The implementation was written so as to conform with Netscapes SSL.
8 * 8 *
9 * This library is free for commercial and non-commercial use as long as 9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions 10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA, 11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation 12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms 13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com). 14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 * 15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in 16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed. 17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution 18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used. 19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or 20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package. 21 * in documentation (online or textual) provided with the package.
22 * 22 *
23 * Redistribution and use in source and binary forms, with or without 23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions 24 * modification, are permitted provided that the following conditions
25 * are met: 25 * are met:
@@ -34,10 +34,10 @@
34 * Eric Young (eay@cryptsoft.com)" 34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library 35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-). 36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from 37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement: 38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 * 40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -49,7 +49,7 @@
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE. 51 * SUCH DAMAGE.
52 * 52 *
53 * The licence and distribution terms for any publically available version or 53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be 54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence 55 * copied and put under another distribution licence
@@ -62,8 +62,9 @@
62#include <openssl/pkcs12.h> 62#include <openssl/pkcs12.h>
63#include <openssl/objects.h> 63#include <openssl/objects.h>
64 64
65void OpenSSL_add_all_ciphers(void) 65void
66 { 66OpenSSL_add_all_ciphers(void)
67{
67 68
68#ifndef OPENSSL_NO_DES 69#ifndef OPENSSL_NO_DES
69 EVP_add_cipher(EVP_des_cfb()); 70 EVP_add_cipher(EVP_des_cfb());
@@ -79,16 +80,16 @@ void OpenSSL_add_all_ciphers(void)
79 EVP_add_cipher(EVP_des_ede3_ofb()); 80 EVP_add_cipher(EVP_des_ede3_ofb());
80 81
81 EVP_add_cipher(EVP_desx_cbc()); 82 EVP_add_cipher(EVP_desx_cbc());
82 EVP_add_cipher_alias(SN_desx_cbc,"DESX"); 83 EVP_add_cipher_alias(SN_desx_cbc, "DESX");
83 EVP_add_cipher_alias(SN_desx_cbc,"desx"); 84 EVP_add_cipher_alias(SN_desx_cbc, "desx");
84 85
85 EVP_add_cipher(EVP_des_cbc()); 86 EVP_add_cipher(EVP_des_cbc());
86 EVP_add_cipher_alias(SN_des_cbc,"DES"); 87 EVP_add_cipher_alias(SN_des_cbc, "DES");
87 EVP_add_cipher_alias(SN_des_cbc,"des"); 88 EVP_add_cipher_alias(SN_des_cbc, "des");
88 EVP_add_cipher(EVP_des_ede_cbc()); 89 EVP_add_cipher(EVP_des_ede_cbc());
89 EVP_add_cipher(EVP_des_ede3_cbc()); 90 EVP_add_cipher(EVP_des_ede3_cbc());
90 EVP_add_cipher_alias(SN_des_ede3_cbc,"DES3"); 91 EVP_add_cipher_alias(SN_des_ede3_cbc, "DES3");
91 EVP_add_cipher_alias(SN_des_ede3_cbc,"des3"); 92 EVP_add_cipher_alias(SN_des_ede3_cbc, "des3");
92 93
93 EVP_add_cipher(EVP_des_ecb()); 94 EVP_add_cipher(EVP_des_ecb());
94 EVP_add_cipher(EVP_des_ede()); 95 EVP_add_cipher(EVP_des_ede());
@@ -108,8 +109,8 @@ void OpenSSL_add_all_ciphers(void)
108 EVP_add_cipher(EVP_idea_cfb()); 109 EVP_add_cipher(EVP_idea_cfb());
109 EVP_add_cipher(EVP_idea_ofb()); 110 EVP_add_cipher(EVP_idea_ofb());
110 EVP_add_cipher(EVP_idea_cbc()); 111 EVP_add_cipher(EVP_idea_cbc());
111 EVP_add_cipher_alias(SN_idea_cbc,"IDEA"); 112 EVP_add_cipher_alias(SN_idea_cbc, "IDEA");
112 EVP_add_cipher_alias(SN_idea_cbc,"idea"); 113 EVP_add_cipher_alias(SN_idea_cbc, "idea");
113#endif 114#endif
114 115
115#ifndef OPENSSL_NO_SEED 116#ifndef OPENSSL_NO_SEED
@@ -117,8 +118,8 @@ void OpenSSL_add_all_ciphers(void)
117 EVP_add_cipher(EVP_seed_cfb()); 118 EVP_add_cipher(EVP_seed_cfb());
118 EVP_add_cipher(EVP_seed_ofb()); 119 EVP_add_cipher(EVP_seed_ofb());
119 EVP_add_cipher(EVP_seed_cbc()); 120 EVP_add_cipher(EVP_seed_cbc());
120 EVP_add_cipher_alias(SN_seed_cbc,"SEED"); 121 EVP_add_cipher_alias(SN_seed_cbc, "SEED");
121 EVP_add_cipher_alias(SN_seed_cbc,"seed"); 122 EVP_add_cipher_alias(SN_seed_cbc, "seed");
122#endif 123#endif
123 124
124#ifndef OPENSSL_NO_RC2 125#ifndef OPENSSL_NO_RC2
@@ -128,8 +129,8 @@ void OpenSSL_add_all_ciphers(void)
128 EVP_add_cipher(EVP_rc2_cbc()); 129 EVP_add_cipher(EVP_rc2_cbc());
129 EVP_add_cipher(EVP_rc2_40_cbc()); 130 EVP_add_cipher(EVP_rc2_40_cbc());
130 EVP_add_cipher(EVP_rc2_64_cbc()); 131 EVP_add_cipher(EVP_rc2_64_cbc());
131 EVP_add_cipher_alias(SN_rc2_cbc,"RC2"); 132 EVP_add_cipher_alias(SN_rc2_cbc, "RC2");
132 EVP_add_cipher_alias(SN_rc2_cbc,"rc2"); 133 EVP_add_cipher_alias(SN_rc2_cbc, "rc2");
133#endif 134#endif
134 135
135#ifndef OPENSSL_NO_BF 136#ifndef OPENSSL_NO_BF
@@ -137,9 +138,9 @@ void OpenSSL_add_all_ciphers(void)
137 EVP_add_cipher(EVP_bf_cfb()); 138 EVP_add_cipher(EVP_bf_cfb());
138 EVP_add_cipher(EVP_bf_ofb()); 139 EVP_add_cipher(EVP_bf_ofb());
139 EVP_add_cipher(EVP_bf_cbc()); 140 EVP_add_cipher(EVP_bf_cbc());
140 EVP_add_cipher_alias(SN_bf_cbc,"BF"); 141 EVP_add_cipher_alias(SN_bf_cbc, "BF");
141 EVP_add_cipher_alias(SN_bf_cbc,"bf"); 142 EVP_add_cipher_alias(SN_bf_cbc, "bf");
142 EVP_add_cipher_alias(SN_bf_cbc,"blowfish"); 143 EVP_add_cipher_alias(SN_bf_cbc, "blowfish");
143#endif 144#endif
144 145
145#ifndef OPENSSL_NO_CAST 146#ifndef OPENSSL_NO_CAST
@@ -147,10 +148,10 @@ void OpenSSL_add_all_ciphers(void)
147 EVP_add_cipher(EVP_cast5_cfb()); 148 EVP_add_cipher(EVP_cast5_cfb());
148 EVP_add_cipher(EVP_cast5_ofb()); 149 EVP_add_cipher(EVP_cast5_ofb());
149 EVP_add_cipher(EVP_cast5_cbc()); 150 EVP_add_cipher(EVP_cast5_cbc());
150 EVP_add_cipher_alias(SN_cast5_cbc,"CAST"); 151 EVP_add_cipher_alias(SN_cast5_cbc, "CAST");
151 EVP_add_cipher_alias(SN_cast5_cbc,"cast"); 152 EVP_add_cipher_alias(SN_cast5_cbc, "cast");
152 EVP_add_cipher_alias(SN_cast5_cbc,"CAST-cbc"); 153 EVP_add_cipher_alias(SN_cast5_cbc, "CAST-cbc");
153 EVP_add_cipher_alias(SN_cast5_cbc,"cast-cbc"); 154 EVP_add_cipher_alias(SN_cast5_cbc, "cast-cbc");
154#endif 155#endif
155 156
156#ifndef OPENSSL_NO_RC5 157#ifndef OPENSSL_NO_RC5
@@ -158,8 +159,8 @@ void OpenSSL_add_all_ciphers(void)
158 EVP_add_cipher(EVP_rc5_32_12_16_cfb()); 159 EVP_add_cipher(EVP_rc5_32_12_16_cfb());
159 EVP_add_cipher(EVP_rc5_32_12_16_ofb()); 160 EVP_add_cipher(EVP_rc5_32_12_16_ofb());
160 EVP_add_cipher(EVP_rc5_32_12_16_cbc()); 161 EVP_add_cipher(EVP_rc5_32_12_16_cbc());
161 EVP_add_cipher_alias(SN_rc5_cbc,"rc5"); 162 EVP_add_cipher_alias(SN_rc5_cbc, "rc5");
162 EVP_add_cipher_alias(SN_rc5_cbc,"RC5"); 163 EVP_add_cipher_alias(SN_rc5_cbc, "RC5");
163#endif 164#endif
164 165
165#ifndef OPENSSL_NO_AES 166#ifndef OPENSSL_NO_AES
@@ -172,8 +173,8 @@ void OpenSSL_add_all_ciphers(void)
172 EVP_add_cipher(EVP_aes_128_ctr()); 173 EVP_add_cipher(EVP_aes_128_ctr());
173 EVP_add_cipher(EVP_aes_128_gcm()); 174 EVP_add_cipher(EVP_aes_128_gcm());
174 EVP_add_cipher(EVP_aes_128_xts()); 175 EVP_add_cipher(EVP_aes_128_xts());
175 EVP_add_cipher_alias(SN_aes_128_cbc,"AES128"); 176 EVP_add_cipher_alias(SN_aes_128_cbc, "AES128");
176 EVP_add_cipher_alias(SN_aes_128_cbc,"aes128"); 177 EVP_add_cipher_alias(SN_aes_128_cbc, "aes128");
177 EVP_add_cipher(EVP_aes_192_ecb()); 178 EVP_add_cipher(EVP_aes_192_ecb());
178 EVP_add_cipher(EVP_aes_192_cbc()); 179 EVP_add_cipher(EVP_aes_192_cbc());
179 EVP_add_cipher(EVP_aes_192_cfb()); 180 EVP_add_cipher(EVP_aes_192_cfb());
@@ -182,8 +183,8 @@ void OpenSSL_add_all_ciphers(void)
182 EVP_add_cipher(EVP_aes_192_ofb()); 183 EVP_add_cipher(EVP_aes_192_ofb());
183 EVP_add_cipher(EVP_aes_192_ctr()); 184 EVP_add_cipher(EVP_aes_192_ctr());
184 EVP_add_cipher(EVP_aes_192_gcm()); 185 EVP_add_cipher(EVP_aes_192_gcm());
185 EVP_add_cipher_alias(SN_aes_192_cbc,"AES192"); 186 EVP_add_cipher_alias(SN_aes_192_cbc, "AES192");
186 EVP_add_cipher_alias(SN_aes_192_cbc,"aes192"); 187 EVP_add_cipher_alias(SN_aes_192_cbc, "aes192");
187 EVP_add_cipher(EVP_aes_256_ecb()); 188 EVP_add_cipher(EVP_aes_256_ecb());
188 EVP_add_cipher(EVP_aes_256_cbc()); 189 EVP_add_cipher(EVP_aes_256_cbc());
189 EVP_add_cipher(EVP_aes_256_cfb()); 190 EVP_add_cipher(EVP_aes_256_cfb());
@@ -193,8 +194,8 @@ void OpenSSL_add_all_ciphers(void)
193 EVP_add_cipher(EVP_aes_256_ctr()); 194 EVP_add_cipher(EVP_aes_256_ctr());
194 EVP_add_cipher(EVP_aes_256_gcm()); 195 EVP_add_cipher(EVP_aes_256_gcm());
195 EVP_add_cipher(EVP_aes_256_xts()); 196 EVP_add_cipher(EVP_aes_256_xts());
196 EVP_add_cipher_alias(SN_aes_256_cbc,"AES256"); 197 EVP_add_cipher_alias(SN_aes_256_cbc, "AES256");
197 EVP_add_cipher_alias(SN_aes_256_cbc,"aes256"); 198 EVP_add_cipher_alias(SN_aes_256_cbc, "aes256");
198#if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA1) 199#if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA1)
199 EVP_add_cipher(EVP_aes_128_cbc_hmac_sha1()); 200 EVP_add_cipher(EVP_aes_128_cbc_hmac_sha1());
200 EVP_add_cipher(EVP_aes_256_cbc_hmac_sha1()); 201 EVP_add_cipher(EVP_aes_256_cbc_hmac_sha1());
@@ -208,27 +209,27 @@ void OpenSSL_add_all_ciphers(void)
208 EVP_add_cipher(EVP_camellia_128_cfb1()); 209 EVP_add_cipher(EVP_camellia_128_cfb1());
209 EVP_add_cipher(EVP_camellia_128_cfb8()); 210 EVP_add_cipher(EVP_camellia_128_cfb8());
210 EVP_add_cipher(EVP_camellia_128_ofb()); 211 EVP_add_cipher(EVP_camellia_128_ofb());
211 EVP_add_cipher_alias(SN_camellia_128_cbc,"CAMELLIA128"); 212 EVP_add_cipher_alias(SN_camellia_128_cbc, "CAMELLIA128");
212 EVP_add_cipher_alias(SN_camellia_128_cbc,"camellia128"); 213 EVP_add_cipher_alias(SN_camellia_128_cbc, "camellia128");
213 EVP_add_cipher(EVP_camellia_192_ecb()); 214 EVP_add_cipher(EVP_camellia_192_ecb());
214 EVP_add_cipher(EVP_camellia_192_cbc()); 215 EVP_add_cipher(EVP_camellia_192_cbc());
215 EVP_add_cipher(EVP_camellia_192_cfb()); 216 EVP_add_cipher(EVP_camellia_192_cfb());
216 EVP_add_cipher(EVP_camellia_192_cfb1()); 217 EVP_add_cipher(EVP_camellia_192_cfb1());
217 EVP_add_cipher(EVP_camellia_192_cfb8()); 218 EVP_add_cipher(EVP_camellia_192_cfb8());
218 EVP_add_cipher(EVP_camellia_192_ofb()); 219 EVP_add_cipher(EVP_camellia_192_ofb());
219 EVP_add_cipher_alias(SN_camellia_192_cbc,"CAMELLIA192"); 220 EVP_add_cipher_alias(SN_camellia_192_cbc, "CAMELLIA192");
220 EVP_add_cipher_alias(SN_camellia_192_cbc,"camellia192"); 221 EVP_add_cipher_alias(SN_camellia_192_cbc, "camellia192");
221 EVP_add_cipher(EVP_camellia_256_ecb()); 222 EVP_add_cipher(EVP_camellia_256_ecb());
222 EVP_add_cipher(EVP_camellia_256_cbc()); 223 EVP_add_cipher(EVP_camellia_256_cbc());
223 EVP_add_cipher(EVP_camellia_256_cfb()); 224 EVP_add_cipher(EVP_camellia_256_cfb());
224 EVP_add_cipher(EVP_camellia_256_cfb1()); 225 EVP_add_cipher(EVP_camellia_256_cfb1());
225 EVP_add_cipher(EVP_camellia_256_cfb8()); 226 EVP_add_cipher(EVP_camellia_256_cfb8());
226 EVP_add_cipher(EVP_camellia_256_ofb()); 227 EVP_add_cipher(EVP_camellia_256_ofb());
227 EVP_add_cipher_alias(SN_camellia_256_cbc,"CAMELLIA256"); 228 EVP_add_cipher_alias(SN_camellia_256_cbc, "CAMELLIA256");
228 EVP_add_cipher_alias(SN_camellia_256_cbc,"camellia256"); 229 EVP_add_cipher_alias(SN_camellia_256_cbc, "camellia256");
229#endif 230#endif
230 231
231#ifndef OPENSSL_NO_CHACHA 232#ifndef OPENSSL_NO_CHACHA
232 EVP_add_cipher(EVP_chacha20()); 233 EVP_add_cipher(EVP_chacha20());
233#endif 234#endif
234 } 235}