* https://www.openssl.org/source/license.html
*/
-/*
- * This file uses the low-level AES functions (which are deprecated for
- * non-internal use) in order to implement the EVP AES ciphers.
- */
-#include "internal/deprecated.h"
-
-#include <string.h>
-#include <assert.h>
-#include <openssl/opensslconf.h>
-#include <openssl/crypto.h>
-#include <openssl/evp.h>
-#include <openssl/err.h>
-#include <openssl/aes.h>
-#include <openssl/rand.h>
-#include <openssl/cmac.h>
#include "crypto/evp.h"
-#include "internal/cryptlib.h"
-#include "crypto/modes.h"
-#include "crypto/siv.h"
-#include "crypto/aes_platform.h"
-#include "evp_local.h"
#define BLOCK_CIPHER_generic(nid, keylen, blocksize, ivlen, nmode, mode, MODE, flags) \
static const EVP_CIPHER aes_##keylen##_##mode = { \
* https://www.openssl.org/source/license.html
*/
-#include <stdio.h>
-#include <string.h>
-#include <openssl/opensslconf.h>
-#include <openssl/evp.h>
-#include <openssl/objects.h>
#include <openssl/aes.h>
-#include <openssl/sha.h>
-#include <openssl/rand.h>
#include "internal/cryptlib.h"
-#include "crypto/modes.h"
#include "crypto/evp.h"
-#include "internal/constant_time.h"
-#include "evp_local.h"
#if defined(AES_ASM) && (defined(__x86_64) || defined(__x86_64__) || defined(_M_AMD64) || defined(_M_X64))
*/
#include "internal/deprecated.h"
-#include <stdio.h>
-#include <string.h>
-#include <openssl/opensslconf.h>
-#include <openssl/evp.h>
-#include <openssl/objects.h>
#include <openssl/aes.h>
#include <openssl/sha.h>
-#include <openssl/rand.h>
#include "internal/cryptlib.h"
-#include "crypto/modes.h"
-#include "internal/constant_time.h"
#include "crypto/evp.h"
-#include "evp_local.h"
#if defined(AES_ASM) && (defined(__x86_64) || defined(__x86_64__) || defined(_M_AMD64) || defined(_M_X64))
* https://www.openssl.org/source/license.html
*/
-#include "internal/deprecated.h"
+#include <openssl/macros.h>
-#include "internal/cryptlib.h"
#ifndef OPENSSL_NO_ARIA
-#include <openssl/evp.h>
-#include <openssl/modes.h>
-#include <openssl/rand.h>
-#include "crypto/aria.h"
#include "crypto/evp.h"
-#include "crypto/modes.h"
-#include "evp_local.h"
IMPLEMENT_BLOCK_CIPHER(aria_128, ks, aria, EVP_ARIA_KEY,
NID_aria_128, 16, 16, 16, 128,
BLOCK_CIPHER_aead(192, ccm, CCM)
BLOCK_CIPHER_aead(256, ccm, CCM)
+#else
+NON_EMPTY_TRANSLATION_UNIT
#endif
* https://www.openssl.org/source/license.html
*/
-#include <stdio.h>
-#include "internal/cryptlib.h"
+#include <openssl/macros.h>
+
#ifndef OPENSSL_NO_BF
-#include <openssl/evp.h>
#include "crypto/evp.h"
-#include <openssl/objects.h>
-#include <openssl/blowfish.h>
-#include "evp_local.h"
IMPLEMENT_BLOCK_CIPHER(bf, ks, BF, EVP_BF_KEY, NID_bf, 8, 16, 8, 64,
EVP_CIPH_VARIABLE_LENGTH)
+#else
+NON_EMPTY_TRANSLATION_UNIT
#endif
* https://www.openssl.org/source/license.html
*/
-#include <openssl/opensslconf.h>
-
-#include <openssl/evp.h>
-#include <openssl/err.h>
-#include <string.h>
-#include <assert.h>
-#include <openssl/camellia.h>
#include "crypto/evp.h"
-#include "crypto/modes.h"
-#include "crypto/cmll_platform.h"
-#include "evp_local.h"
#define BLOCK_CIPHER_generic(nid, keylen, blocksize, ivlen, nmode, mode, MODE, flags) \
static const EVP_CIPHER camellia_##keylen##_##mode = { \
* https://www.openssl.org/source/license.html
*/
-#include <stdio.h>
-#include "internal/cryptlib.h"
+#include <openssl/macros.h>
#ifndef OPENSSL_NO_CAST
-#include <openssl/evp.h>
-#include <openssl/objects.h>
-#include "crypto/evp.h"
#include <openssl/cast.h>
-#include "evp_local.h"
+#include "crypto/evp.h"
IMPLEMENT_BLOCK_CIPHER(cast5, ks, CAST, EVP_CAST_KEY,
NID_cast5, 8, CAST_KEY_LENGTH, 8, 64,
EVP_CIPH_VARIABLE_LENGTH)
+#else
+NON_EMPTY_TRANSLATION_UNIT
#endif
* https://www.openssl.org/source/license.html
*/
-#include <stdio.h>
-#include "internal/cryptlib.h"
-#include "internal/endian.h"
+#include <openssl/macros.h>
#ifndef OPENSSL_NO_CHACHA
-#include <openssl/evp.h>
-#include <openssl/objects.h>
#include "crypto/evp.h"
-#include "evp_local.h"
#include "crypto/chacha.h"
static const EVP_CIPHER chacha20 = {
return (&chacha20_poly1305);
}
#endif
+#else
+NON_EMPTY_TRANSLATION_UNIT
#endif
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
-#include <stdio.h>
-#include "internal/cryptlib.h"
+
+#include <openssl/macros.h>
+
#ifndef OPENSSL_NO_DES
-#include <openssl/evp.h>
-#include <openssl/objects.h>
#include "crypto/evp.h"
-#include <openssl/des.h>
-#include <openssl/rand.h>
-#include "evp_local.h"
BLOCK_CIPHER_defs(des, EVP_DES_KEY, NID_des, 8, 8, 8, 64,
EVP_CIPH_RAND_KEY)
BLOCK_CIPHER_def_cfb(des, EVP_DES_KEY, NID_des, 8, 8, 8,
EVP_CIPH_RAND_KEY)
+#else
+NON_EMPTY_TRANSLATION_UNIT
#endif
* https://www.openssl.org/source/license.html
*/
-#include <stdio.h>
-#include "internal/cryptlib.h"
+#include <openssl/macros.h>
+
#ifndef OPENSSL_NO_DES
-#include <openssl/objects.h>
#include "crypto/evp.h"
-#include <openssl/des.h>
-#include <openssl/rand.h>
-#include "evp_local.h"
BLOCK_CIPHER_defs(des_ede, DES_EDE_KEY, NID_des_ede, 8, 16, 8, 64,
EVP_CIPH_RAND_KEY | EVP_CIPH_FLAG_DEFAULT_ASN1)
return &des3_wrap;
}
+#else
+NON_EMPTY_TRANSLATION_UNIT
#endif
* https://www.openssl.org/source/license.html
*/
-#include <stdio.h>
-#include "internal/cryptlib.h"
+#include <openssl/macros.h>
#ifndef OPENSSL_NO_IDEA
-#include <openssl/evp.h>
-#include <openssl/objects.h>
#include "crypto/evp.h"
-#include <openssl/idea.h>
-#include "evp_local.h"
BLOCK_CIPHER_defs(idea, IDEA_KEY_SCHEDULE, NID_idea, 8, 16, 8, 64,
0)
+#else
+NON_EMPTY_TRANSLATION_UNIT
#endif
* https://www.openssl.org/source/license.html
*/
-#include <stdio.h>
-#include "internal/cryptlib.h"
-#include <openssl/evp.h>
-#include <openssl/objects.h>
#include "crypto/evp.h"
static const EVP_CIPHER n_cipher = {
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
-#include <stdio.h>
-#include "internal/cryptlib.h"
+#include <openssl/macros.h>
#ifndef OPENSSL_NO_RC2
-
-#include <openssl/evp.h>
-#include <openssl/objects.h>
#include "crypto/evp.h"
#include <openssl/rc2.h>
-#include "evp_local.h"
IMPLEMENT_BLOCK_CIPHER(rc2, ks, RC2, EVP_RC2_KEY, NID_rc2,
8,
return &r2_40_cbc_cipher;
}
+#else
+NON_EMPTY_TRANSLATION_UNIT
#endif
* https://www.openssl.org/source/license.html
*/
-#include <stdio.h>
-#include "internal/cryptlib.h"
+#include <openssl/macros.h>
#ifndef OPENSSL_NO_RC4
-
-#include <openssl/evp.h>
-#include <openssl/objects.h>
-#include <openssl/rc4.h>
-
#include "crypto/evp.h"
static const EVP_CIPHER r4_cipher = {
{
return &r4_40_cipher;
}
+#else
+NON_EMPTY_TRANSLATION_UNIT
#endif
* https://www.openssl.org/source/license.html
*/
-/*
- * MD5 and RC4 low level APIs are deprecated for public use, but still ok for
- * internal use.
- */
-#include "internal/deprecated.h"
-
-#include "internal/cryptlib.h"
-#include <openssl/opensslconf.h>
+#include <openssl/macros.h>
#if !defined(OPENSSL_NO_RC4) && !defined(OPENSSL_NO_MD5)
-
#include "crypto/evp.h"
static const EVP_CIPHER r4_hmac_md5_cipher = {
{
return &r4_hmac_md5_cipher;
}
+#else
+NON_EMPTY_TRANSLATION_UNIT
#endif
* https://www.openssl.org/source/license.html
*/
-#include <stdio.h>
-#include "internal/cryptlib.h"
+#include <openssl/macros.h>
#ifndef OPENSSL_NO_RC5
-
-#include <openssl/evp.h>
#include "crypto/evp.h"
-#include <openssl/objects.h>
-#include "evp_local.h"
#include <openssl/rc5.h>
IMPLEMENT_BLOCK_CIPHER(rc5_32_12_16, ks, RC5_32, EVP_RC5_KEY, NID_rc5,
8, RC5_32_KEY_LENGTH, 8, 64,
EVP_CIPH_VARIABLE_LENGTH | EVP_CIPH_CTRL_INIT)
+#else
+NON_EMPTY_TRANSLATION_UNIT
#endif
* https://www.openssl.org/source/license.html
*/
-#include <openssl/opensslconf.h>
-#include <openssl/evp.h>
-#include <openssl/err.h>
-#include <string.h>
-#include <assert.h>
-#include <openssl/seed.h>
#include "crypto/evp.h"
-#include "evp_local.h"
IMPLEMENT_BLOCK_CIPHER(seed, ks, SEED, EVP_SEED_KEY, NID_seed,
16, 16, 16, 128, EVP_CIPH_FLAG_DEFAULT_ASN1)
* https://www.openssl.org/source/license.html
*/
-#include "internal/deprecated.h"
+#include <openssl/macros.h>
-#include "internal/cryptlib.h"
#ifndef OPENSSL_NO_SM4
-#include <openssl/evp.h>
-#include <openssl/modes.h>
-#include "crypto/sm4.h"
#include "crypto/evp.h"
-#include "crypto/sm4_platform.h"
-#include "evp_local.h"
#define BLOCK_CIPHER_generic(nid, blocksize, ivlen, nmode, mode, MODE, flags) \
static const EVP_CIPHER sm4_##mode = { \
BLOCK_CIPHER_generic(nid, 1, 16, ctr, ctr, CTR, flags)
DEFINE_BLOCK_CIPHERS(NID_sm4, 0)
+#else
+NON_EMPTY_TRANSLATION_UNIT
#endif
* https://www.openssl.org/source/license.html
*/
-#include <stdio.h>
-#include "internal/cryptlib.h"
+#include <openssl/macros.h>
#ifndef OPENSSL_NO_DES
-
-#include <openssl/evp.h>
-#include <openssl/objects.h>
#include "crypto/evp.h"
-#include <openssl/des.h>
-#include "evp_local.h"
static const EVP_CIPHER d_xcbc_cipher = {
NID_desx_cbc,
{
return &d_xcbc_cipher;
}
+#else
+NON_EMPTY_TRANSLATION_UNIT
#endif