]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Disable clang format around .c includes
authorBob Beck <beck@openssl.org>
Thu, 28 Aug 2025 18:59:59 +0000 (12:59 -0600)
committerNeil Horman <nhorman@openssl.org>
Thu, 4 Dec 2025 16:35:06 +0000 (11:35 -0500)
we assume these to be order sensitive and not self contained, so
as per our new style we disable clang format around them.

we should consider renaming to .inc, or doing away with some
of these and just putting the code inline, but that's for
later consideration.

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29257)

14 files changed:
crypto/LPdir_win32.c
crypto/LPdir_wince.c
crypto/bn/asm/x86_64-gcc.c
crypto/des/cbc_enc.c
crypto/des/des_enc.c
crypto/o_dir.c
engines/e_afalg.c
engines/e_capi.c
engines/e_dasync.c
engines/e_loader_attic.c
engines/e_ossltest.c
engines/e_padlock.c
providers/implementations/macs/blake2b_mac.c
providers/implementations/macs/blake2s_mac.c

index b29e096ff30f939de5c38f9674a7f8bf38c0df30..33b8261774c4c31bf3433ea3e774a45cb139b73f 100644 (file)
@@ -38,4 +38,6 @@
 
 #define LP_SYS_WIN32
 #define LP_MULTIBYTE_AVAILABLE
+/* clang-format off */
 #include "LPdir_win.c"
+/* clang-format on */
index ebf89628272a502d909e8eb3fabfcad7deca70cc..e4c883dcefe46d2622aeb3073c7aabd4cbf1d813 100644 (file)
@@ -41,4 +41,6 @@
  * We might want to define LP_MULTIBYTE_AVAILABLE here.  It's currently under
  * investigation what the exact conditions would be
  */
+/* clang-format off */
 #include "LPdir_win.c"
+/* clang-format on */
index 68453b3d5276cf859ae7074f3fd7251fb16fdec6..7429423bb93e0be5b1fbd97a08ec48fa19b18242 100644 (file)
@@ -9,7 +9,9 @@
 
 #include "../bn_local.h"
 #if !(defined(__GNUC__) && __GNUC__>=2)
+/* clang-format off */
 # include "../bn_asm.c"         /* kind of dirty hack for Sun Studio */
+/* clang-format on */
 #else
 /*-
  * x86_64 BIGNUM accelerator version 0.1, December 2002.
index aa8ac1a5c339fcdc3520fc16e7a958075b8eb35e..d13cbe19d2b469e5445972fc59bb27e54ccb047d 100644 (file)
@@ -15,4 +15,6 @@
 
 #define CBC_ENC_C__DONT_UPDATE_IV
 
+/* clang-format off */
 #include "ncbc_enc.c"           /* des_cbc_encrypt */
+/* clang-format on */
index 0041f21b8d3ba9393a24a5204c2f568ebd87a32d..37a424cd4e7451c292e3c16492a44e8424834282 100644 (file)
@@ -195,7 +195,9 @@ void DES_decrypt3(DES_LONG *data, DES_key_schedule *ks1,
 #ifndef DES_DEFAULT_OPTIONS
 
 # undef CBC_ENC_C__DONT_UPDATE_IV
+/* clang-format off */
 # include "ncbc_enc.c"          /* DES_ncbc_encrypt */
+/* clang-format on */
 
 void DES_ede3_cbc_encrypt(const unsigned char *input, unsigned char *output,
                           long length, DES_key_schedule *ks1,
index d7f5d64d064f3c621bf9e4357cce3ab849b0be3c..36d33fbed4f9c7ba075129da64c3c33b8b3d7c0e 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "internal/o_dir.h"
 
+/* clang-format off */
 #define LPDIR_H
 #if defined OPENSSL_SYS_UNIX || defined DJGPP \
     || (defined __VMS_VER && __VMS_VER >= 70000000)
@@ -35,3 +36,4 @@
 #else
 # include "LPdir_nyi.c"
 #endif
+/* clang-format on */
index e31555ea08a8b168012ea1a483d48d1b076667ec..e97ba4bc66520e41298a8a6988cb41993095e31b 100644 (file)
@@ -48,8 +48,10 @@ void engine_load_afalg_int(void)
 # include <sys/syscall.h>
 # include <errno.h>
 
+/* clang-format off */
 # include "e_afalg.h"
 # include "e_afalg_err.c"
+/* clang-format on */
 
 # ifndef SOL_ALG
 #  define SOL_ALG 279
index ffc5bf7a2aa8d563c2b852c4acc5a3a71e7b8967..dff5c2c8731402aa8a1f002136ba57b3916cb018 100644 (file)
 # include <openssl/pem.h>
 # include <openssl/x509v3.h>
 
+/* clang-format off */
 # include "e_capi_err.h"
 # include "e_capi_err.c"
+/* clang-format on */
 
 static const char *engine_capi_id = "capi";
 static const char *engine_capi_name = "CryptoAPI ENGINE";
index 5f809e8321997682c581da552364317291417353..47eca87a6b103fb7ddb2bf3f9e22cbf826f3eeae 100644 (file)
@@ -46,7 +46,9 @@
 # define ASYNC_WIN
 #endif
 
+/* clang-format off */
 #include "e_dasync_err.c"
+/* clang-format on */
 
 /* Engine Id and Name */
 static const char *engine_dasync_id = "dasync";
index 154f36cbdd16444a85007d4ff7eeb2de81872921..4d670966b6a8be23c876b0e344793079825eb6e0 100644 (file)
@@ -38,7 +38,9 @@
 #include "crypto/ctype.h"        /* For ossl_isdigit */
 #include "crypto/pem.h"          /* For PVK and "blob" PEM headers */
 
+/* clang-format off */
 #include "e_loader_attic_err.c"
+/* clang-format on */
 
 DEFINE_STACK_OF(OSSL_STORE_INFO)
 
index 19dda64d1f5fd8dd195319706bf38bb01ef41fc8..91182ec254761d6e5563e88d97b0ba70e9b5cfc4 100644 (file)
@@ -41,7 +41,9 @@
 #include <openssl/pem.h>
 #include <crypto/evp.h>
 
+/* clang-format off */
 #include "e_ossltest_err.c"
+/* clang-format on */
 
 /* Engine Id and Name */
 static const char *engine_ossltest_id = "ossltest";
index 7e0cfc21fc9b89329d14292133f338975ad323a8..369c9a787c643341b708dc7350ef1e8dc6ff4e88 100644 (file)
@@ -156,7 +156,9 @@ static int padlock_aes_set_decrypt_key(const unsigned char *userKey,
 #   define AES_ASM
 #   define AES_set_encrypt_key padlock_aes_set_encrypt_key
 #   define AES_set_decrypt_key padlock_aes_set_decrypt_key
+/* clang-format off */
 #   include "../crypto/aes/aes_core.c"
+/* clang-format on */
 #  endif
 
 /*
index b445cbd57875ec0918a471c866e8613e1247b0ec..7ba2b71b376b9472de487f2c791844a6f3c4953b 100644 (file)
@@ -29,5 +29,7 @@
 /* OSSL_DISPATCH symbol */
 #define BLAKE2_FUNCTIONS ossl_blake2bmac_functions
 
+/* clang-format off */
 #include "blake2_mac_impl.c"
+/* clang-format on */
 
index 6b3fa28bd36be53fc224ca08c77adbcc87c35fed..0d89267aa6c656ce5faa17667af6653d60d0d9ca 100644 (file)
@@ -29,4 +29,6 @@
 /* OSSL_DISPATCH symbol */
 #define BLAKE2_FUNCTIONS ossl_blake2smac_functions
 
+/* clang-format off */
 #include "blake2_mac_impl.c"
+/* clang-format on */