From 5482f7f31863bd209e2f594c751ead79f03aa62e Mon Sep 17 00:00:00 2001 From: tb <> Date: Sat, 25 Jan 2025 17:59:44 +0000 Subject: Remove #error if OPENSSL_NO_FOO is defined discussed with jsing --- src/lib/libcrypto/aes/aes.h | 6 +----- src/lib/libcrypto/aes/aes_local.h | 6 +----- src/lib/libcrypto/bf/blowfish.h | 6 +----- src/lib/libcrypto/camellia/camellia.h | 6 +----- src/lib/libcrypto/cast/cast.h | 6 +----- src/lib/libcrypto/chacha/chacha.h | 6 +----- src/lib/libcrypto/des/des.h | 6 +----- src/lib/libcrypto/dh/dh.h | 6 +----- src/lib/libcrypto/dsa/dsa.h | 6 +----- src/lib/libcrypto/ec/ec.h | 6 +----- src/lib/libcrypto/hmac/hmac.h | 6 +----- src/lib/libcrypto/idea/idea.h | 6 +----- src/lib/libcrypto/md4/md4.h | 6 +----- src/lib/libcrypto/md5/md5.h | 6 +----- src/lib/libcrypto/poly1305/poly1305.h | 6 +----- src/lib/libcrypto/rc2/rc2.h | 6 +----- src/lib/libcrypto/rc4/rc4.h | 6 +----- src/lib/libcrypto/ripemd/ripemd.h | 6 +----- src/lib/libcrypto/rsa/rsa.h | 6 +----- src/lib/libcrypto/sha/sha.h | 6 +----- src/lib/libcrypto/sm2/sm2.h | 6 +----- src/lib/libcrypto/sm3/sm3.h | 6 +----- src/lib/libcrypto/sm4/sm4.h | 6 +----- 23 files changed, 23 insertions(+), 115 deletions(-) (limited to 'src') diff --git a/src/lib/libcrypto/aes/aes.h b/src/lib/libcrypto/aes/aes.h index 702873e11c..8903a8ef8d 100644 --- a/src/lib/libcrypto/aes/aes.h +++ b/src/lib/libcrypto/aes/aes.h @@ -1,4 +1,4 @@ -/* $OpenBSD: aes.h,v 1.15 2023/07/31 05:04:06 tb Exp $ */ +/* $OpenBSD: aes.h,v 1.16 2025/01/25 17:59:44 tb Exp $ */ /* ==================================================================== * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. * @@ -54,10 +54,6 @@ #include -#ifdef OPENSSL_NO_AES -#error AES is disabled. -#endif - #include #define AES_ENCRYPT 1 diff --git a/src/lib/libcrypto/aes/aes_local.h b/src/lib/libcrypto/aes/aes_local.h index 3f134408c9..e0714df409 100644 --- a/src/lib/libcrypto/aes/aes_local.h +++ b/src/lib/libcrypto/aes/aes_local.h @@ -1,4 +1,4 @@ -/* $OpenBSD: aes_local.h,v 1.3 2024/03/27 11:15:44 jsing Exp $ */ +/* $OpenBSD: aes_local.h,v 1.4 2025/01/25 17:59:44 tb Exp $ */ /* ==================================================================== * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. * @@ -54,10 +54,6 @@ #include -#ifdef OPENSSL_NO_AES -#error AES is disabled. -#endif - #include #include #include diff --git a/src/lib/libcrypto/bf/blowfish.h b/src/lib/libcrypto/bf/blowfish.h index b434e70cbb..5ea99af396 100644 --- a/src/lib/libcrypto/bf/blowfish.h +++ b/src/lib/libcrypto/bf/blowfish.h @@ -1,4 +1,4 @@ -/* $OpenBSD: blowfish.h,v 1.17 2023/07/31 05:04:06 tb Exp $ */ +/* $OpenBSD: blowfish.h,v 1.18 2025/01/25 17:59:44 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -65,10 +65,6 @@ extern "C" { #endif -#ifdef OPENSSL_NO_BF -#error BF is disabled. -#endif - #define BF_ENCRYPT 1 #define BF_DECRYPT 0 diff --git a/src/lib/libcrypto/camellia/camellia.h b/src/lib/libcrypto/camellia/camellia.h index b9b5f792b1..c1f1a179c1 100644 --- a/src/lib/libcrypto/camellia/camellia.h +++ b/src/lib/libcrypto/camellia/camellia.h @@ -1,4 +1,4 @@ -/* $OpenBSD: camellia.h,v 1.5 2014/11/13 20:01:58 miod Exp $ */ +/* $OpenBSD: camellia.h,v 1.6 2025/01/25 17:59:44 tb Exp $ */ /* ==================================================================== * Copyright (c) 2006 The OpenSSL Project. All rights reserved. * @@ -54,10 +54,6 @@ #include -#ifdef OPENSSL_NO_CAMELLIA -#error CAMELLIA is disabled. -#endif - #include #define CAMELLIA_ENCRYPT 1 diff --git a/src/lib/libcrypto/cast/cast.h b/src/lib/libcrypto/cast/cast.h index 0936696066..5c12d91f97 100644 --- a/src/lib/libcrypto/cast/cast.h +++ b/src/lib/libcrypto/cast/cast.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cast.h,v 1.13 2023/07/08 07:25:43 jsing Exp $ */ +/* $OpenBSD: cast.h,v 1.14 2025/01/25 17:59:44 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -65,10 +65,6 @@ extern "C" { #endif -#ifdef OPENSSL_NO_CAST -#error CAST is disabled. -#endif - #define CAST_ENCRYPT 1 #define CAST_DECRYPT 0 diff --git a/src/lib/libcrypto/chacha/chacha.h b/src/lib/libcrypto/chacha/chacha.h index e2345b2199..7d30c518a4 100644 --- a/src/lib/libcrypto/chacha/chacha.h +++ b/src/lib/libcrypto/chacha/chacha.h @@ -1,4 +1,4 @@ -/* $OpenBSD: chacha.h,v 1.8 2019/01/22 00:59:21 dlg Exp $ */ +/* $OpenBSD: chacha.h,v 1.9 2025/01/25 17:59:44 tb Exp $ */ /* * Copyright (c) 2014 Joel Sing * @@ -20,10 +20,6 @@ #include -#if defined(OPENSSL_NO_CHACHA) -#error ChaCha is disabled. -#endif - #include #include diff --git a/src/lib/libcrypto/des/des.h b/src/lib/libcrypto/des/des.h index 5891fcefe9..2d957a192c 100644 --- a/src/lib/libcrypto/des/des.h +++ b/src/lib/libcrypto/des/des.h @@ -1,4 +1,4 @@ -/* $OpenBSD: des.h,v 1.22 2024/08/31 10:30:16 tb Exp $ */ +/* $OpenBSD: des.h,v 1.23 2025/01/25 17:59:44 tb Exp $ */ /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -61,10 +61,6 @@ #include -#ifdef OPENSSL_NO_DES -#error DES is disabled. -#endif - #ifdef __cplusplus extern "C" { #endif diff --git a/src/lib/libcrypto/dh/dh.h b/src/lib/libcrypto/dh/dh.h index 65b4348acf..04bda3fac7 100644 --- a/src/lib/libcrypto/dh/dh.h +++ b/src/lib/libcrypto/dh/dh.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dh.h,v 1.37 2023/04/18 08:33:43 tb Exp $ */ +/* $OpenBSD: dh.h,v 1.38 2025/01/25 17:59:44 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -61,10 +61,6 @@ #include -#ifdef OPENSSL_NO_DH -#error DH is disabled. -#endif - #ifndef OPENSSL_NO_BIO #include #endif diff --git a/src/lib/libcrypto/dsa/dsa.h b/src/lib/libcrypto/dsa/dsa.h index 9f3d561239..332697ccf3 100644 --- a/src/lib/libcrypto/dsa/dsa.h +++ b/src/lib/libcrypto/dsa/dsa.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dsa.h,v 1.46 2024/12/05 19:34:46 tb Exp $ */ +/* $OpenBSD: dsa.h,v 1.47 2025/01/25 17:59:44 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -67,10 +67,6 @@ #include -#ifdef OPENSSL_NO_DSA -#error DSA is disabled. -#endif - #ifndef OPENSSL_NO_BIO #include #endif diff --git a/src/lib/libcrypto/ec/ec.h b/src/lib/libcrypto/ec/ec.h index 10513795e4..dd06dcb8b4 100644 --- a/src/lib/libcrypto/ec/ec.h +++ b/src/lib/libcrypto/ec/ec.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ec.h,v 1.48 2024/04/15 15:42:23 tb Exp $ */ +/* $OpenBSD: ec.h,v 1.49 2025/01/25 17:59:44 tb Exp $ */ /* * Originally written by Bodo Moeller for the OpenSSL project. */ @@ -73,10 +73,6 @@ #include -#ifdef OPENSSL_NO_EC -#error EC is disabled. -#endif - #include #include diff --git a/src/lib/libcrypto/hmac/hmac.h b/src/lib/libcrypto/hmac/hmac.h index 6f29972aad..2216fd9258 100644 --- a/src/lib/libcrypto/hmac/hmac.h +++ b/src/lib/libcrypto/hmac/hmac.h @@ -1,4 +1,4 @@ -/* $OpenBSD: hmac.h,v 1.20 2024/08/31 10:42:21 tb Exp $ */ +/* $OpenBSD: hmac.h,v 1.21 2025/01/25 17:59:44 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -64,10 +64,6 @@ #define __bounded__(x, y, z) #endif -#ifdef OPENSSL_NO_HMAC -#error HMAC is disabled. -#endif - #include #define HMAC_MAX_MD_CBLOCK 144 /* largest known is SHA3-224 */ diff --git a/src/lib/libcrypto/idea/idea.h b/src/lib/libcrypto/idea/idea.h index 81c3453bce..2bdd3647fd 100644 --- a/src/lib/libcrypto/idea/idea.h +++ b/src/lib/libcrypto/idea/idea.h @@ -1,4 +1,4 @@ -/* $OpenBSD: idea.h,v 1.12 2024/05/19 07:12:50 jsg Exp $ */ +/* $OpenBSD: idea.h,v 1.13 2025/01/25 17:59:44 tb Exp $ */ /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -61,10 +61,6 @@ #include /* IDEA_INT, OPENSSL_NO_IDEA */ -#ifdef OPENSSL_NO_IDEA -#error IDEA is disabled. -#endif - #define IDEA_ENCRYPT 1 #define IDEA_DECRYPT 0 diff --git a/src/lib/libcrypto/md4/md4.h b/src/lib/libcrypto/md4/md4.h index 2d0169e719..d2a107a19a 100644 --- a/src/lib/libcrypto/md4/md4.h +++ b/src/lib/libcrypto/md4/md4.h @@ -1,4 +1,4 @@ -/* $OpenBSD: md4.h,v 1.21 2024/06/01 18:42:49 tb Exp $ */ +/* $OpenBSD: md4.h,v 1.22 2025/01/25 17:59:44 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -71,10 +71,6 @@ extern "C" { #endif -#ifdef OPENSSL_NO_MD4 -#error MD4 is disabled. -#endif - /* * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! * ! MD4_LONG has to be at least 32 bits wide. ! diff --git a/src/lib/libcrypto/md5/md5.h b/src/lib/libcrypto/md5/md5.h index 99e71783b9..4d94c84ba6 100644 --- a/src/lib/libcrypto/md5/md5.h +++ b/src/lib/libcrypto/md5/md5.h @@ -1,4 +1,4 @@ -/* $OpenBSD: md5.h,v 1.24 2025/01/19 07:51:41 jsing Exp $ */ +/* $OpenBSD: md5.h,v 1.25 2025/01/25 17:59:44 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -71,10 +71,6 @@ extern "C" { #endif -#ifdef OPENSSL_NO_MD5 -#error MD5 is disabled. -#endif - #define MD5_LONG unsigned int #define MD5_CBLOCK 64 diff --git a/src/lib/libcrypto/poly1305/poly1305.h b/src/lib/libcrypto/poly1305/poly1305.h index 00ab0bfd2b..f5383355a6 100644 --- a/src/lib/libcrypto/poly1305/poly1305.h +++ b/src/lib/libcrypto/poly1305/poly1305.h @@ -1,4 +1,4 @@ -/* $OpenBSD: poly1305.h,v 1.3 2014/07/25 14:04:51 jsing Exp $ */ +/* $OpenBSD: poly1305.h,v 1.4 2025/01/25 17:59:44 tb Exp $ */ /* * Copyright (c) 2014 Joel Sing * @@ -20,10 +20,6 @@ #include -#if defined(OPENSSL_NO_POLY1305) -#error Poly1305 is disabled. -#endif - #include #ifdef __cplusplus diff --git a/src/lib/libcrypto/rc2/rc2.h b/src/lib/libcrypto/rc2/rc2.h index 09c6c08a51..96e395f32d 100644 --- a/src/lib/libcrypto/rc2/rc2.h +++ b/src/lib/libcrypto/rc2/rc2.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rc2.h,v 1.12 2023/07/07 08:29:37 beck Exp $ */ +/* $OpenBSD: rc2.h,v 1.13 2025/01/25 17:59:44 tb Exp $ */ /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -61,10 +61,6 @@ #include /* OPENSSL_NO_RC2, RC2_INT */ -#ifdef OPENSSL_NO_RC2 -#error RC2 is disabled. -#endif - #define RC2_ENCRYPT 1 #define RC2_DECRYPT 0 diff --git a/src/lib/libcrypto/rc4/rc4.h b/src/lib/libcrypto/rc4/rc4.h index ff2514187f..a20472372b 100644 --- a/src/lib/libcrypto/rc4/rc4.h +++ b/src/lib/libcrypto/rc4/rc4.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rc4.h,v 1.15 2024/03/27 12:13:08 jsing Exp $ */ +/* $OpenBSD: rc4.h,v 1.16 2025/01/25 17:59:44 tb Exp $ */ /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -61,10 +61,6 @@ #include /* OPENSSL_NO_RC4, RC4_INT */ -#ifdef OPENSSL_NO_RC4 -#error RC4 is disabled. -#endif - #include #ifdef __cplusplus diff --git a/src/lib/libcrypto/ripemd/ripemd.h b/src/lib/libcrypto/ripemd/ripemd.h index 83f7b36bc0..c7b1bd79b9 100644 --- a/src/lib/libcrypto/ripemd/ripemd.h +++ b/src/lib/libcrypto/ripemd/ripemd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ripemd.h,v 1.19 2024/06/01 18:42:49 tb Exp $ */ +/* $OpenBSD: ripemd.h,v 1.20 2025/01/25 17:59:44 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -71,10 +71,6 @@ extern "C" { #endif -#ifdef OPENSSL_NO_RIPEMD -#error RIPEMD is disabled. -#endif - #if defined(__LP32__) #define RIPEMD160_LONG unsigned long #elif defined(__ILP64__) diff --git a/src/lib/libcrypto/rsa/rsa.h b/src/lib/libcrypto/rsa/rsa.h index 60512317bd..5620128998 100644 --- a/src/lib/libcrypto/rsa/rsa.h +++ b/src/lib/libcrypto/rsa/rsa.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rsa.h,v 1.66 2024/05/19 07:12:50 jsg Exp $ */ +/* $OpenBSD: rsa.h,v 1.67 2025/01/25 17:59:44 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -71,10 +71,6 @@ #include -#ifdef OPENSSL_NO_RSA -#error RSA is disabled. -#endif - #ifdef __cplusplus extern "C" { #endif diff --git a/src/lib/libcrypto/sha/sha.h b/src/lib/libcrypto/sha/sha.h index cef2d7f497..ec97f48b2e 100644 --- a/src/lib/libcrypto/sha/sha.h +++ b/src/lib/libcrypto/sha/sha.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sha.h,v 1.25 2024/06/01 08:11:44 tb Exp $ */ +/* $OpenBSD: sha.h,v 1.26 2025/01/25 17:59:44 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -70,10 +70,6 @@ extern "C" { #endif -#if defined(OPENSSL_NO_SHA) || defined(OPENSSL_NO_SHA1) -#error SHA is disabled. -#endif - /* * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! * ! SHA_LONG has to be at least 32 bits wide. ! diff --git a/src/lib/libcrypto/sm2/sm2.h b/src/lib/libcrypto/sm2/sm2.h index 2f14fe666e..b5195a73e1 100644 --- a/src/lib/libcrypto/sm2/sm2.h +++ b/src/lib/libcrypto/sm2/sm2.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sm2.h,v 1.3 2023/07/28 15:50:33 tb Exp $ */ +/* $OpenBSD: sm2.h,v 1.4 2025/01/25 17:59:44 tb Exp $ */ /* * Copyright (c) 2017, 2019 Ribose Inc * @@ -22,10 +22,6 @@ #include -#ifdef OPENSSL_NO_SM2 -#error SM2 is disabled. -#endif - #ifdef __cplusplus extern "C" { #endif diff --git a/src/lib/libcrypto/sm3/sm3.h b/src/lib/libcrypto/sm3/sm3.h index 553c64dcdb..fa435d3d0f 100644 --- a/src/lib/libcrypto/sm3/sm3.h +++ b/src/lib/libcrypto/sm3/sm3.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sm3.h,v 1.1 2018/11/11 06:53:31 tb Exp $ */ +/* $OpenBSD: sm3.h,v 1.2 2025/01/25 17:59:44 tb Exp $ */ /* * Copyright (c) 2018, Ribose Inc * @@ -25,10 +25,6 @@ extern "C" { #endif -#ifdef OPENSSL_NO_SM3 -#error SM3 is disabled. -#endif - #define SM3_DIGEST_LENGTH 32 #define SM3_WORD unsigned int diff --git a/src/lib/libcrypto/sm4/sm4.h b/src/lib/libcrypto/sm4/sm4.h index 5931ac714b..0c7fc223eb 100644 --- a/src/lib/libcrypto/sm4/sm4.h +++ b/src/lib/libcrypto/sm4/sm4.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sm4.h,v 1.1 2019/03/17 17:42:37 tb Exp $ */ +/* $OpenBSD: sm4.h,v 1.2 2025/01/25 17:59:44 tb Exp $ */ /* * Copyright (c) 2017, 2019 Ribose Inc * @@ -26,10 +26,6 @@ extern "C" { #endif -#ifdef OPENSSL_NO_SM4 -#error SM4 is disabled. -#endif - #define SM4_DECRYPT 0 #define SM4_ENCRYPT 1 -- cgit v1.2.3-55-g6feb