159191Skris/* crypto/evp/c_allc.c */ 259191Skris/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 359191Skris * All rights reserved. 459191Skris * 559191Skris * This package is an SSL implementation written 659191Skris * by Eric Young (eay@cryptsoft.com). 759191Skris * The implementation was written so as to conform with Netscapes SSL. 8296341Sdelphij * 959191Skris * This library is free for commercial and non-commercial use as long as 1059191Skris * the following conditions are aheared to. The following conditions 1159191Skris * apply to all code found in this distribution, be it the RC4, RSA, 1259191Skris * lhash, DES, etc., code; not just the SSL code. The SSL documentation 1359191Skris * included with this distribution is covered by the same copyright terms 1459191Skris * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15296341Sdelphij * 1659191Skris * Copyright remains Eric Young's, and as such any Copyright notices in 1759191Skris * the code are not to be removed. 1859191Skris * If this package is used in a product, Eric Young should be given attribution 1959191Skris * as the author of the parts of the library used. 2059191Skris * This can be in the form of a textual message at program startup or 2159191Skris * in documentation (online or textual) provided with the package. 22296341Sdelphij * 2359191Skris * Redistribution and use in source and binary forms, with or without 2459191Skris * modification, are permitted provided that the following conditions 2559191Skris * are met: 2659191Skris * 1. Redistributions of source code must retain the copyright 2759191Skris * notice, this list of conditions and the following disclaimer. 2859191Skris * 2. Redistributions in binary form must reproduce the above copyright 2959191Skris * notice, this list of conditions and the following disclaimer in the 3059191Skris * documentation and/or other materials provided with the distribution. 3159191Skris * 3. All advertising materials mentioning features or use of this software 3259191Skris * must display the following acknowledgement: 3359191Skris * "This product includes cryptographic software written by 3459191Skris * Eric Young (eay@cryptsoft.com)" 3559191Skris * The word 'cryptographic' can be left out if the rouines from the library 3659191Skris * being used are not cryptographic related :-). 37296341Sdelphij * 4. If you include any Windows specific code (or a derivative thereof) from 3859191Skris * the apps directory (application code) you must include an acknowledgement: 3959191Skris * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40296341Sdelphij * 4159191Skris * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 4259191Skris * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 4359191Skris * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 4459191Skris * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 4559191Skris * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 4659191Skris * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 4759191Skris * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 4859191Skris * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 4959191Skris * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 5059191Skris * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 5159191Skris * SUCH DAMAGE. 52296341Sdelphij * 5359191Skris * The licence and distribution terms for any publically available version or 5459191Skris * derivative of this code cannot be changed. i.e. this code cannot simply be 5559191Skris * copied and put under another distribution licence 5659191Skris * [including the GNU Public Licence.] 5759191Skris */ 5859191Skris 5959191Skris#include <stdio.h> 6059191Skris#include "cryptlib.h" 6159191Skris#include <openssl/evp.h> 6259191Skris#include <openssl/pkcs12.h> 6359191Skris#include <openssl/objects.h> 6459191Skris 6559191Skrisvoid OpenSSL_add_all_ciphers(void) 66296341Sdelphij{ 67100936Snectar 68109998Smarkm#ifndef OPENSSL_NO_DES 69296341Sdelphij EVP_add_cipher(EVP_des_cfb()); 70296341Sdelphij EVP_add_cipher(EVP_des_cfb1()); 71296341Sdelphij EVP_add_cipher(EVP_des_cfb8()); 72296341Sdelphij EVP_add_cipher(EVP_des_ede_cfb()); 73296341Sdelphij EVP_add_cipher(EVP_des_ede3_cfb()); 74296341Sdelphij EVP_add_cipher(EVP_des_ede3_cfb1()); 75296341Sdelphij EVP_add_cipher(EVP_des_ede3_cfb8()); 7659191Skris 77296341Sdelphij EVP_add_cipher(EVP_des_ofb()); 78296341Sdelphij EVP_add_cipher(EVP_des_ede_ofb()); 79296341Sdelphij EVP_add_cipher(EVP_des_ede3_ofb()); 8059191Skris 81296341Sdelphij EVP_add_cipher(EVP_desx_cbc()); 82296341Sdelphij EVP_add_cipher_alias(SN_desx_cbc, "DESX"); 83296341Sdelphij EVP_add_cipher_alias(SN_desx_cbc, "desx"); 8459191Skris 85296341Sdelphij EVP_add_cipher(EVP_des_cbc()); 86296341Sdelphij EVP_add_cipher_alias(SN_des_cbc, "DES"); 87296341Sdelphij EVP_add_cipher_alias(SN_des_cbc, "des"); 88296341Sdelphij EVP_add_cipher(EVP_des_ede_cbc()); 89296341Sdelphij EVP_add_cipher(EVP_des_ede3_cbc()); 90296341Sdelphij EVP_add_cipher_alias(SN_des_ede3_cbc, "DES3"); 91296341Sdelphij EVP_add_cipher_alias(SN_des_ede3_cbc, "des3"); 9259191Skris 93296341Sdelphij EVP_add_cipher(EVP_des_ecb()); 94296341Sdelphij EVP_add_cipher(EVP_des_ede()); 95296341Sdelphij EVP_add_cipher(EVP_des_ede3()); 9659191Skris#endif 9759191Skris 98109998Smarkm#ifndef OPENSSL_NO_RC4 99296341Sdelphij EVP_add_cipher(EVP_rc4()); 100296341Sdelphij EVP_add_cipher(EVP_rc4_40()); 101296341Sdelphij# ifndef OPENSSL_NO_MD5 102296341Sdelphij EVP_add_cipher(EVP_rc4_hmac_md5()); 103296341Sdelphij# endif 10459191Skris#endif 10559191Skris 106109998Smarkm#ifndef OPENSSL_NO_IDEA 107296341Sdelphij EVP_add_cipher(EVP_idea_ecb()); 108296341Sdelphij EVP_add_cipher(EVP_idea_cfb()); 109296341Sdelphij EVP_add_cipher(EVP_idea_ofb()); 110296341Sdelphij EVP_add_cipher(EVP_idea_cbc()); 111296341Sdelphij EVP_add_cipher_alias(SN_idea_cbc, "IDEA"); 112296341Sdelphij EVP_add_cipher_alias(SN_idea_cbc, "idea"); 11359191Skris#endif 11459191Skris 115194206Ssimon#ifndef OPENSSL_NO_SEED 116296341Sdelphij EVP_add_cipher(EVP_seed_ecb()); 117296341Sdelphij EVP_add_cipher(EVP_seed_cfb()); 118296341Sdelphij EVP_add_cipher(EVP_seed_ofb()); 119296341Sdelphij EVP_add_cipher(EVP_seed_cbc()); 120296341Sdelphij EVP_add_cipher_alias(SN_seed_cbc, "SEED"); 121296341Sdelphij EVP_add_cipher_alias(SN_seed_cbc, "seed"); 122194206Ssimon#endif 123194206Ssimon 124109998Smarkm#ifndef OPENSSL_NO_RC2 125296341Sdelphij EVP_add_cipher(EVP_rc2_ecb()); 126296341Sdelphij EVP_add_cipher(EVP_rc2_cfb()); 127296341Sdelphij EVP_add_cipher(EVP_rc2_ofb()); 128296341Sdelphij EVP_add_cipher(EVP_rc2_cbc()); 129296341Sdelphij EVP_add_cipher(EVP_rc2_40_cbc()); 130296341Sdelphij EVP_add_cipher(EVP_rc2_64_cbc()); 131296341Sdelphij EVP_add_cipher_alias(SN_rc2_cbc, "RC2"); 132296341Sdelphij EVP_add_cipher_alias(SN_rc2_cbc, "rc2"); 13359191Skris#endif 13459191Skris 135109998Smarkm#ifndef OPENSSL_NO_BF 136296341Sdelphij EVP_add_cipher(EVP_bf_ecb()); 137296341Sdelphij EVP_add_cipher(EVP_bf_cfb()); 138296341Sdelphij EVP_add_cipher(EVP_bf_ofb()); 139296341Sdelphij EVP_add_cipher(EVP_bf_cbc()); 140296341Sdelphij EVP_add_cipher_alias(SN_bf_cbc, "BF"); 141296341Sdelphij EVP_add_cipher_alias(SN_bf_cbc, "bf"); 142296341Sdelphij EVP_add_cipher_alias(SN_bf_cbc, "blowfish"); 14359191Skris#endif 14459191Skris 145109998Smarkm#ifndef OPENSSL_NO_CAST 146296341Sdelphij EVP_add_cipher(EVP_cast5_ecb()); 147296341Sdelphij EVP_add_cipher(EVP_cast5_cfb()); 148296341Sdelphij EVP_add_cipher(EVP_cast5_ofb()); 149296341Sdelphij EVP_add_cipher(EVP_cast5_cbc()); 150296341Sdelphij EVP_add_cipher_alias(SN_cast5_cbc, "CAST"); 151296341Sdelphij EVP_add_cipher_alias(SN_cast5_cbc, "cast"); 152296341Sdelphij EVP_add_cipher_alias(SN_cast5_cbc, "CAST-cbc"); 153296341Sdelphij EVP_add_cipher_alias(SN_cast5_cbc, "cast-cbc"); 15459191Skris#endif 15559191Skris 156109998Smarkm#ifndef OPENSSL_NO_RC5 157296341Sdelphij EVP_add_cipher(EVP_rc5_32_12_16_ecb()); 158296341Sdelphij EVP_add_cipher(EVP_rc5_32_12_16_cfb()); 159296341Sdelphij EVP_add_cipher(EVP_rc5_32_12_16_ofb()); 160296341Sdelphij EVP_add_cipher(EVP_rc5_32_12_16_cbc()); 161296341Sdelphij EVP_add_cipher_alias(SN_rc5_cbc, "rc5"); 162296341Sdelphij EVP_add_cipher_alias(SN_rc5_cbc, "RC5"); 16359191Skris#endif 164109998Smarkm 165109998Smarkm#ifndef OPENSSL_NO_AES 166296341Sdelphij EVP_add_cipher(EVP_aes_128_ecb()); 167296341Sdelphij EVP_add_cipher(EVP_aes_128_cbc()); 168296341Sdelphij EVP_add_cipher(EVP_aes_128_cfb()); 169296341Sdelphij EVP_add_cipher(EVP_aes_128_cfb1()); 170296341Sdelphij EVP_add_cipher(EVP_aes_128_cfb8()); 171296341Sdelphij EVP_add_cipher(EVP_aes_128_ofb()); 172296341Sdelphij EVP_add_cipher(EVP_aes_128_ctr()); 173296341Sdelphij EVP_add_cipher(EVP_aes_128_gcm()); 174296341Sdelphij EVP_add_cipher(EVP_aes_128_xts()); 175296341Sdelphij EVP_add_cipher_alias(SN_aes_128_cbc, "AES128"); 176296341Sdelphij EVP_add_cipher_alias(SN_aes_128_cbc, "aes128"); 177296341Sdelphij EVP_add_cipher(EVP_aes_192_ecb()); 178296341Sdelphij EVP_add_cipher(EVP_aes_192_cbc()); 179296341Sdelphij EVP_add_cipher(EVP_aes_192_cfb()); 180296341Sdelphij EVP_add_cipher(EVP_aes_192_cfb1()); 181296341Sdelphij EVP_add_cipher(EVP_aes_192_cfb8()); 182296341Sdelphij EVP_add_cipher(EVP_aes_192_ofb()); 183296341Sdelphij EVP_add_cipher(EVP_aes_192_ctr()); 184296341Sdelphij EVP_add_cipher(EVP_aes_192_gcm()); 185296341Sdelphij EVP_add_cipher_alias(SN_aes_192_cbc, "AES192"); 186296341Sdelphij EVP_add_cipher_alias(SN_aes_192_cbc, "aes192"); 187296341Sdelphij EVP_add_cipher(EVP_aes_256_ecb()); 188296341Sdelphij EVP_add_cipher(EVP_aes_256_cbc()); 189296341Sdelphij EVP_add_cipher(EVP_aes_256_cfb()); 190296341Sdelphij EVP_add_cipher(EVP_aes_256_cfb1()); 191296341Sdelphij EVP_add_cipher(EVP_aes_256_cfb8()); 192296341Sdelphij EVP_add_cipher(EVP_aes_256_ofb()); 193296341Sdelphij EVP_add_cipher(EVP_aes_256_ctr()); 194296341Sdelphij EVP_add_cipher(EVP_aes_256_gcm()); 195296341Sdelphij EVP_add_cipher(EVP_aes_256_xts()); 196296341Sdelphij EVP_add_cipher_alias(SN_aes_256_cbc, "AES256"); 197296341Sdelphij EVP_add_cipher_alias(SN_aes_256_cbc, "aes256"); 198296341Sdelphij# if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA1) 199296341Sdelphij EVP_add_cipher(EVP_aes_128_cbc_hmac_sha1()); 200296341Sdelphij EVP_add_cipher(EVP_aes_256_cbc_hmac_sha1()); 201296341Sdelphij# endif 202109998Smarkm#endif 203162911Ssimon 204162911Ssimon#ifndef OPENSSL_NO_CAMELLIA 205296341Sdelphij EVP_add_cipher(EVP_camellia_128_ecb()); 206296341Sdelphij EVP_add_cipher(EVP_camellia_128_cbc()); 207296341Sdelphij EVP_add_cipher(EVP_camellia_128_cfb()); 208296341Sdelphij EVP_add_cipher(EVP_camellia_128_cfb1()); 209296341Sdelphij EVP_add_cipher(EVP_camellia_128_cfb8()); 210296341Sdelphij EVP_add_cipher(EVP_camellia_128_ofb()); 211296341Sdelphij EVP_add_cipher_alias(SN_camellia_128_cbc, "CAMELLIA128"); 212296341Sdelphij EVP_add_cipher_alias(SN_camellia_128_cbc, "camellia128"); 213296341Sdelphij EVP_add_cipher(EVP_camellia_192_ecb()); 214296341Sdelphij EVP_add_cipher(EVP_camellia_192_cbc()); 215296341Sdelphij EVP_add_cipher(EVP_camellia_192_cfb()); 216296341Sdelphij EVP_add_cipher(EVP_camellia_192_cfb1()); 217296341Sdelphij EVP_add_cipher(EVP_camellia_192_cfb8()); 218296341Sdelphij EVP_add_cipher(EVP_camellia_192_ofb()); 219296341Sdelphij EVP_add_cipher_alias(SN_camellia_192_cbc, "CAMELLIA192"); 220296341Sdelphij EVP_add_cipher_alias(SN_camellia_192_cbc, "camellia192"); 221296341Sdelphij EVP_add_cipher(EVP_camellia_256_ecb()); 222296341Sdelphij EVP_add_cipher(EVP_camellia_256_cbc()); 223296341Sdelphij EVP_add_cipher(EVP_camellia_256_cfb()); 224296341Sdelphij EVP_add_cipher(EVP_camellia_256_cfb1()); 225296341Sdelphij EVP_add_cipher(EVP_camellia_256_cfb8()); 226296341Sdelphij EVP_add_cipher(EVP_camellia_256_ofb()); 227296341Sdelphij EVP_add_cipher_alias(SN_camellia_256_cbc, "CAMELLIA256"); 228296341Sdelphij EVP_add_cipher_alias(SN_camellia_256_cbc, "camellia256"); 229162911Ssimon#endif 230296341Sdelphij} 231