From bbaeadb068c3289c7df3b7bea0049f70a648ba00 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Sun, 16 Jul 2023 20:03:40 +0200 Subject: [PATCH] "foo * bar" should be "foo *bar" Found by running the checkpatch.pl Linux script to enforce coding style. Reviewed-by: Paul Dale Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/21468) --- apps/dgst.c | 2 +- apps/include/opt.h | 6 ++--- apps/lib/apps.c | 8 +++---- apps/openssl.c | 4 ++-- apps/speed.c | 4 ++-- crypto/conf/conf_def.c | 2 +- crypto/cpuid.c | 2 +- crypto/ec/curve448/curve448.c | 6 ++--- crypto/ec/curve448/point_448.h | 2 +- crypto/evp/e_chacha20_poly1305.c | 2 +- crypto/pem/pem_lib.c | 2 +- crypto/trace.c | 2 +- crypto/x509/v3_admis.c | 4 ++-- demos/digest/BIO_f_md.c | 2 +- demos/digest/EVP_MD_demo.c | 4 ++-- demos/digest/EVP_MD_stdin.c | 2 +- engines/e_dasync.c | 2 +- include/crypto/aes_platform.h | 24 +++++++++---------- include/crypto/asn1.h | 6 ++--- include/openssl/store.h | 2 +- .../ciphers/cipher_aes_gcm_siv.c | 2 +- .../implementations/ciphers/cipher_aes_siv.c | 2 +- .../implementations/ciphers/cipher_rc2.c | 2 +- .../implementations/ciphers/cipher_rc4.c | 2 +- .../implementations/ciphers/cipher_rc5.c | 2 +- .../implementations/rands/seeding/rand_unix.c | 6 ++--- ssl/d1_lib.c | 2 +- ssl/ssl_ciph.c | 2 +- ssl/ssl_conf.c | 4 ++-- ssl/ssl_init.c | 2 +- ssl/ssl_lib.c | 6 ++--- ssl/statem/statem_clnt.c | 2 +- test/afalgtest.c | 2 +- test/drbgtest.c | 4 ++-- test/ectest.c | 2 +- test/evp_test.c | 8 +++---- test/ocspapitest.c | 2 +- test/sslapitest.c | 2 +- 38 files changed, 71 insertions(+), 71 deletions(-) diff --git a/apps/dgst.c b/apps/dgst.c index c983da80f9..fe05b312d7 100644 --- a/apps/dgst.c +++ b/apps/dgst.c @@ -513,7 +513,7 @@ static void show_digests(const OBJ_NAME *name, void *arg) * in the '*sum' checksum programs. This aims to preserve backward * compatibility. */ -static const char *newline_escape_filename(const char *file, int * backslash) +static const char *newline_escape_filename(const char *file, int *backslash) { size_t i, e = 0, length = strlen(file), newline_count = 0, mem_len = 0; char *file_cpy = NULL; diff --git a/apps/include/opt.h b/apps/include/opt.h index 82b383c269..5a2faa150b 100644 --- a/apps/include/opt.h +++ b/apps/include/opt.h @@ -387,11 +387,11 @@ typedef struct string_int_pair_st { #define OPT_PARAMETERS() { OPT_PARAM_STR, 1, '-', "Parameters:\n" } const char *opt_path_end(const char *filename); -char *opt_init(int ac, char **av, const OPTIONS * o); +char *opt_init(int ac, char **av, const OPTIONS *o); char *opt_progname(const char *argv0); char *opt_appname(const char *argv0); char *opt_getprog(void); -void opt_help(const OPTIONS * list); +void opt_help(const OPTIONS *list); void opt_begin(void); int opt_next(void); @@ -419,7 +419,7 @@ int opt_format(const char *s, unsigned long flags, int *result); void print_format_error(int format, unsigned long flags); int opt_printf_stderr(const char *fmt, ...); int opt_string(const char *name, const char **options); -int opt_pair(const char *arg, const OPT_PAIR * pairs, int *result); +int opt_pair(const char *arg, const OPT_PAIR *pairs, int *result); int opt_verify(int i, X509_VERIFY_PARAM *vpm); int opt_rand(int i); diff --git a/apps/lib/apps.c b/apps/lib/apps.c index 79617c0db7..8aad9a1ef7 100644 --- a/apps/lib/apps.c +++ b/apps/lib/apps.c @@ -75,9 +75,9 @@ typedef struct { } NAME_EX_TBL; static int set_table_opts(unsigned long *flags, const char *arg, - const NAME_EX_TBL * in_tbl); + const NAME_EX_TBL *in_tbl); static int set_multi_opts(unsigned long *flags, const char *arg, - const NAME_EX_TBL * in_tbl); + const NAME_EX_TBL *in_tbl); int app_init(long mesgwin); int chopup_args(ARGS *arg, char *buf) @@ -1270,7 +1270,7 @@ int copy_extensions(X509 *x, X509_REQ *req, int copy_type) } static int set_multi_opts(unsigned long *flags, const char *arg, - const NAME_EX_TBL * in_tbl) + const NAME_EX_TBL *in_tbl) { STACK_OF(CONF_VALUE) *vals; CONF_VALUE *val; @@ -1289,7 +1289,7 @@ static int set_multi_opts(unsigned long *flags, const char *arg, } static int set_table_opts(unsigned long *flags, const char *arg, - const NAME_EX_TBL * in_tbl) + const NAME_EX_TBL *in_tbl) { char c; const NAME_EX_TBL *ptbl; diff --git a/apps/openssl.c b/apps/openssl.c index 0122117ce2..dd41ac3a84 100644 --- a/apps/openssl.c +++ b/apps/openssl.c @@ -446,12 +446,12 @@ static int do_cmd(LHASH_OF(FUNCTION) *prog, int argc, char *argv[]) return 1; } -static int function_cmp(const FUNCTION * a, const FUNCTION * b) +static int function_cmp(const FUNCTION *a, const FUNCTION *b) { return strncmp(a->name, b->name, 8); } -static unsigned long function_hash(const FUNCTION * a) +static unsigned long function_hash(const FUNCTION *a) { return OPENSSL_LH_strhash(a->name); } diff --git a/apps/speed.c b/apps/speed.c index 367e2e08c7..88d389523b 100644 --- a/apps/speed.c +++ b/apps/speed.c @@ -566,7 +566,7 @@ typedef struct loopargs_st { unsigned char *sig_sig[MAX_KEM_NUM]; } loopargs_t; static int run_benchmark(int async_jobs, int (*loop_function) (void *), - loopargs_t * loopargs); + loopargs_t *loopargs); static unsigned int testnum; @@ -1363,7 +1363,7 @@ static int SIG_verify_loop(void *args) } static int run_benchmark(int async_jobs, - int (*loop_function) (void *), loopargs_t * loopargs) + int (*loop_function) (void *), loopargs_t *loopargs) { int job_op_count = 0; int total_op_count = 0; diff --git a/crypto/conf/conf_def.c b/crypto/conf/conf_def.c index 0a6de477e3..e047746f67 100644 --- a/crypto/conf/conf_def.c +++ b/crypto/conf/conf_def.c @@ -892,7 +892,7 @@ static BIO *get_next_file(const char *path, OPENSSL_DIR_CTX **dirctx) static int is_keytype(const CONF *conf, char c, unsigned short type) { - const unsigned short * keytypes = (const unsigned short *) conf->meth_data; + const unsigned short *keytypes = (const unsigned short *) conf->meth_data; unsigned char key = (unsigned char)c; #ifdef CHARSET_EBCDIC diff --git a/crypto/cpuid.c b/crypto/cpuid.c index a7c4f97fb4..e5db03f3f6 100644 --- a/crypto/cpuid.c +++ b/crypto/cpuid.c @@ -181,7 +181,7 @@ void OPENSSL_cpuid_setup(void) * There are also assembler versions of this function. */ # undef CRYPTO_memcmp -int CRYPTO_memcmp(const void * in_a, const void * in_b, size_t len) +int CRYPTO_memcmp(const void *in_a, const void *in_b, size_t len) { size_t i; const volatile unsigned char *a = in_a; diff --git a/crypto/ec/curve448/curve448.c b/crypto/ec/curve448/curve448.c index f9cc0b9732..2422d068a0 100644 --- a/crypto/ec/curve448/curve448.c +++ b/crypto/ec/curve448/curve448.c @@ -221,7 +221,7 @@ ossl_curve448_point_valid(const curve448_point_t p) } static ossl_inline void constant_time_lookup_niels(niels_s * RESTRICT ni, - const niels_t * table, + const niels_t *table, int nelts, int idx) { constant_time_lookup(ni, table, sizeof(niels_s), nelts, idx); @@ -229,7 +229,7 @@ static ossl_inline void constant_time_lookup_niels(niels_s * RESTRICT ni, void ossl_curve448_precomputed_scalarmul(curve448_point_t out, - const curve448_precomputed_s * table, + const curve448_precomputed_s *table, const curve448_scalar_t scalar) { unsigned int i, j, k; @@ -612,7 +612,7 @@ static int recode_wnaf(struct smvt_control *control, return n - 1; } -static void prepare_wnaf_table(pniels_t * output, +static void prepare_wnaf_table(pniels_t *output, const curve448_point_t working, unsigned int tbits) { diff --git a/crypto/ec/curve448/point_448.h b/crypto/ec/curve448/point_448.h index e67ea68044..597ded4211 100644 --- a/crypto/ec/curve448/point_448.h +++ b/crypto/ec/curve448/point_448.h @@ -271,7 +271,7 @@ ossl_x448_derive_public_key(uint8_t out[X448_PUBLIC_BYTES], */ void ossl_curve448_precomputed_scalarmul(curve448_point_t scaled, - const curve448_precomputed_s * base, + const curve448_precomputed_s *base, const curve448_scalar_t scalar); /* diff --git a/crypto/evp/e_chacha20_poly1305.c b/crypto/evp/e_chacha20_poly1305.c index fad7682328..68b216f10c 100644 --- a/crypto/evp/e_chacha20_poly1305.c +++ b/crypto/evp/e_chacha20_poly1305.c @@ -55,7 +55,7 @@ static int chacha_init_key(EVP_CIPHER_CTX *ctx, return 1; } -static int chacha_cipher(EVP_CIPHER_CTX * ctx, unsigned char *out, +static int chacha_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *inp, size_t len) { EVP_CHACHA_KEY *key = data(ctx); diff --git a/crypto/pem/pem_lib.c b/crypto/pem/pem_lib.c index f9256c8565..9d8ad35ad3 100644 --- a/crypto/pem/pem_lib.c +++ b/crypto/pem/pem_lib.c @@ -929,7 +929,7 @@ int PEM_read_bio_ex(BIO *bp, char **name_out, char **header, BIO *headerB = NULL, *dataB = NULL; char *name = NULL; int len, taillen, headerlen, ret = 0; - BUF_MEM * buf_mem; + BUF_MEM *buf_mem; *len_out = 0; *name_out = *header = NULL; diff --git a/crypto/trace.c b/crypto/trace.c index 76f1fc98aa..51387641de 100644 --- a/crypto/trace.c +++ b/crypto/trace.c @@ -502,7 +502,7 @@ BIO *OSSL_trace_begin(int category) return channel; } -void OSSL_trace_end(int category, BIO * channel) +void OSSL_trace_end(int category, BIO *channel) { #ifndef OPENSSL_NO_TRACE char *suffix = NULL; diff --git a/crypto/x509/v3_admis.c b/crypto/x509/v3_admis.c index 3316e93bf2..c3182a71db 100644 --- a/crypto/x509/v3_admis.c +++ b/crypto/x509/v3_admis.c @@ -71,7 +71,7 @@ const X509V3_EXT_METHOD ossl_v3_ext_admission = { static int i2r_NAMING_AUTHORITY(const struct v3_ext_method *method, void *in, BIO *bp, int ind) { - NAMING_AUTHORITY * namingAuthority = (NAMING_AUTHORITY*) in; + NAMING_AUTHORITY *namingAuthority = (NAMING_AUTHORITY*) in; if (namingAuthority == NULL) return 0; @@ -118,7 +118,7 @@ err: static int i2r_ADMISSION_SYNTAX(const struct v3_ext_method *method, void *in, BIO *bp, int ind) { - ADMISSION_SYNTAX * admission = (ADMISSION_SYNTAX *)in; + ADMISSION_SYNTAX *admission = (ADMISSION_SYNTAX *)in; int i, j, k; if (admission->admissionAuthority != NULL) { diff --git a/demos/digest/BIO_f_md.c b/demos/digest/BIO_f_md.c index 14697c3a8a..119bdecf3c 100644 --- a/demos/digest/BIO_f_md.c +++ b/demos/digest/BIO_f_md.c @@ -34,7 +34,7 @@ * The default digest is SHA3-512 */ -int main(int argc, char * argv[]) +int main(int argc, char *argv[]) { int ret = EXIT_FAILURE; OSSL_LIB_CTX *library_context = NULL; diff --git a/demos/digest/EVP_MD_demo.c b/demos/digest/EVP_MD_demo.c index e525eaa7b0..8cf3bd8e7b 100644 --- a/demos/digest/EVP_MD_demo.c +++ b/demos/digest/EVP_MD_demo.c @@ -24,7 +24,7 @@ * more than once. */ -const char * hamlet_1 = +const char *hamlet_1 = "To be, or not to be, that is the question,\n" "Whether tis nobler in the minde to suffer\n" "The Å¿lings and arrowes of outragious fortune,\n" @@ -43,7 +43,7 @@ const char * hamlet_1 = "The oppressor's wrong, the proud man's Contumely,\n" "The pangs of dispised love, the Law's delay,\n" ; -const char * hamlet_2 = +const char *hamlet_2 = "The insolence of Office, and the spurns\n" "That patient merit of the'unworthy takes,\n" "When he himself might his Quietas make\n" diff --git a/demos/digest/EVP_MD_stdin.c b/demos/digest/EVP_MD_stdin.c index 534c723d57..11bffb6bcc 100644 --- a/demos/digest/EVP_MD_stdin.c +++ b/demos/digest/EVP_MD_stdin.c @@ -35,7 +35,7 @@ int demonstrate_digest(BIO *input) { OSSL_LIB_CTX *library_context = NULL; int ret = 0; - const char * option_properties = NULL; + const char *option_properties = NULL; EVP_MD *message_digest = NULL; EVP_MD_CTX *digest_context = NULL; unsigned int digest_length; diff --git a/engines/e_dasync.c b/engines/e_dasync.c index 92be34d427..63b13d3d45 100644 --- a/engines/e_dasync.c +++ b/engines/e_dasync.c @@ -519,7 +519,7 @@ static void dummy_pause_job(void) { ASYNC_JOB *job; ASYNC_WAIT_CTX *waitctx; ASYNC_callback_fn callback; - void * callback_arg; + void *callback_arg; OSSL_ASYNC_FD pipefds[2] = {0, 0}; OSSL_ASYNC_FD *writefd; #if defined(ASYNC_WIN) diff --git a/include/crypto/aes_platform.h b/include/crypto/aes_platform.h index 5d90ddaf1f..cbc035926e 100644 --- a/include/crypto/aes_platform.h +++ b/include/crypto/aes_platform.h @@ -121,29 +121,29 @@ void gcm_ghash_p8(u64 Xi[2],const u128 Htable[16],const u8 *inp, size_t len); (gctx)->gcm.funcs.ghash==gcm_ghash_v8) /* The [unroll8_eor3_]aes_gcm_(enc|dec)_(128|192|256)_kernel() functions * take input length in BITS and return number of BYTES processed */ -size_t aes_gcm_enc_128_kernel(const uint8_t * plaintext, uint64_t plaintext_length, uint8_t * ciphertext, +size_t aes_gcm_enc_128_kernel(const uint8_t *plaintext, uint64_t plaintext_length, uint8_t *ciphertext, uint64_t *Xi, unsigned char ivec[16], const void *key); -size_t aes_gcm_enc_192_kernel(const uint8_t * plaintext, uint64_t plaintext_length, uint8_t * ciphertext, +size_t aes_gcm_enc_192_kernel(const uint8_t *plaintext, uint64_t plaintext_length, uint8_t *ciphertext, uint64_t *Xi, unsigned char ivec[16], const void *key); -size_t aes_gcm_enc_256_kernel(const uint8_t * plaintext, uint64_t plaintext_length, uint8_t * ciphertext, +size_t aes_gcm_enc_256_kernel(const uint8_t *plaintext, uint64_t plaintext_length, uint8_t *ciphertext, uint64_t *Xi, unsigned char ivec[16], const void *key); -size_t aes_gcm_dec_128_kernel(const uint8_t * ciphertext, uint64_t plaintext_length, uint8_t * plaintext, +size_t aes_gcm_dec_128_kernel(const uint8_t *ciphertext, uint64_t plaintext_length, uint8_t *plaintext, uint64_t *Xi, unsigned char ivec[16], const void *key); -size_t aes_gcm_dec_192_kernel(const uint8_t * ciphertext, uint64_t plaintext_length, uint8_t * plaintext, +size_t aes_gcm_dec_192_kernel(const uint8_t *ciphertext, uint64_t plaintext_length, uint8_t *plaintext, uint64_t *Xi, unsigned char ivec[16], const void *key); -size_t aes_gcm_dec_256_kernel(const uint8_t * ciphertext, uint64_t plaintext_length, uint8_t * plaintext, +size_t aes_gcm_dec_256_kernel(const uint8_t *ciphertext, uint64_t plaintext_length, uint8_t *plaintext, uint64_t *Xi, unsigned char ivec[16], const void *key); -size_t unroll8_eor3_aes_gcm_enc_128_kernel(const uint8_t * plaintext, uint64_t plaintext_length, uint8_t * ciphertext, +size_t unroll8_eor3_aes_gcm_enc_128_kernel(const uint8_t *plaintext, uint64_t plaintext_length, uint8_t *ciphertext, uint64_t *Xi, unsigned char ivec[16], const void *key); -size_t unroll8_eor3_aes_gcm_enc_192_kernel(const uint8_t * plaintext, uint64_t plaintext_length, uint8_t * ciphertext, +size_t unroll8_eor3_aes_gcm_enc_192_kernel(const uint8_t *plaintext, uint64_t plaintext_length, uint8_t *ciphertext, uint64_t *Xi, unsigned char ivec[16], const void *key); -size_t unroll8_eor3_aes_gcm_enc_256_kernel(const uint8_t * plaintext, uint64_t plaintext_length, uint8_t * ciphertext, +size_t unroll8_eor3_aes_gcm_enc_256_kernel(const uint8_t *plaintext, uint64_t plaintext_length, uint8_t *ciphertext, uint64_t *Xi, unsigned char ivec[16], const void *key); -size_t unroll8_eor3_aes_gcm_dec_128_kernel(const uint8_t * ciphertext, uint64_t plaintext_length, uint8_t * plaintext, +size_t unroll8_eor3_aes_gcm_dec_128_kernel(const uint8_t *ciphertext, uint64_t plaintext_length, uint8_t *plaintext, uint64_t *Xi, unsigned char ivec[16], const void *key); -size_t unroll8_eor3_aes_gcm_dec_192_kernel(const uint8_t * ciphertext, uint64_t plaintext_length, uint8_t * plaintext, +size_t unroll8_eor3_aes_gcm_dec_192_kernel(const uint8_t *ciphertext, uint64_t plaintext_length, uint8_t *plaintext, uint64_t *Xi, unsigned char ivec[16], const void *key); -size_t unroll8_eor3_aes_gcm_dec_256_kernel(const uint8_t * ciphertext, uint64_t plaintext_length, uint8_t * plaintext, +size_t unroll8_eor3_aes_gcm_dec_256_kernel(const uint8_t *ciphertext, uint64_t plaintext_length, uint8_t *plaintext, uint64_t *Xi, unsigned char ivec[16], const void *key); size_t armv8_aes_gcm_encrypt(const unsigned char *in, unsigned char *out, size_t len, const void *key, unsigned char ivec[16], u64 *Xi); diff --git a/include/crypto/asn1.h b/include/crypto/asn1.h index 7636510c12..180238526b 100644 --- a/include/crypto/asn1.h +++ b/include/crypto/asn1.h @@ -142,9 +142,9 @@ X509_ALGOR *ossl_x509_algor_mgf1_decode(X509_ALGOR *alg); int ossl_x509_algor_md_to_mgf1(X509_ALGOR **palg, const EVP_MD *mgf1md); int ossl_asn1_time_print_ex(BIO *bp, const ASN1_TIME *tm, unsigned long flags); -EVP_PKEY * ossl_d2i_PrivateKey_legacy(int keytype, EVP_PKEY **a, - const unsigned char **pp, long length, - OSSL_LIB_CTX *libctx, const char *propq); +EVP_PKEY *ossl_d2i_PrivateKey_legacy(int keytype, EVP_PKEY **a, + const unsigned char **pp, long length, + OSSL_LIB_CTX *libctx, const char *propq); X509_ALGOR *ossl_X509_ALGOR_from_nid(int nid, int ptype, void *pval); time_t ossl_asn1_string_to_time_t(const char *asn1_string); diff --git a/include/openssl/store.h b/include/openssl/store.h index 3c1445e0e6..dafb16fd90 100644 --- a/include/openssl/store.h +++ b/include/openssl/store.h @@ -345,7 +345,7 @@ int OSSL_STORE_LOADER_set_close(OSSL_STORE_LOADER *loader, OSSL_DEPRECATEDIN_3_0 const ENGINE *OSSL_STORE_LOADER_get0_engine(const OSSL_STORE_LOADER *loader); OSSL_DEPRECATEDIN_3_0 -const char * OSSL_STORE_LOADER_get0_scheme(const OSSL_STORE_LOADER *loader); +const char *OSSL_STORE_LOADER_get0_scheme(const OSSL_STORE_LOADER *loader); OSSL_DEPRECATEDIN_3_0 int OSSL_STORE_register_loader(OSSL_STORE_LOADER *loader); OSSL_DEPRECATEDIN_3_0 diff --git a/providers/implementations/ciphers/cipher_aes_gcm_siv.c b/providers/implementations/ciphers/cipher_aes_gcm_siv.c index 3f3606cc79..64f7f95039 100644 --- a/providers/implementations/ciphers/cipher_aes_gcm_siv.c +++ b/providers/implementations/ciphers/cipher_aes_gcm_siv.c @@ -296,7 +296,7 @@ static int ossl_##alg##_##kbits##_##lc##_get_params(OSSL_PARAM params[]) return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \ flags, kbits, blkbits, ivbits); \ } \ -static void * ossl_##alg##kbits##_##lc##_newctx(void *provctx) \ +static void *ossl_##alg##kbits##_##lc##_newctx(void *provctx) \ { \ return ossl_##alg##_##lc##_newctx(provctx, kbits); \ } \ diff --git a/providers/implementations/ciphers/cipher_aes_siv.c b/providers/implementations/ciphers/cipher_aes_siv.c index e780cfa44c..bcbc17a48a 100644 --- a/providers/implementations/ciphers/cipher_aes_siv.c +++ b/providers/implementations/ciphers/cipher_aes_siv.c @@ -271,7 +271,7 @@ static int alg##_##kbits##_##lc##_get_params(OSSL_PARAM params[]) \ return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \ flags, 2*kbits, blkbits, ivbits); \ } \ -static void * alg##kbits##lc##_newctx(void *provctx) \ +static void *alg##kbits##lc##_newctx(void *provctx) \ { \ return alg##_##lc##_newctx(provctx, 2*kbits, EVP_CIPH_##UCMODE##_MODE, \ flags); \ diff --git a/providers/implementations/ciphers/cipher_rc2.c b/providers/implementations/ciphers/cipher_rc2.c index 5c2301e866..a4cd6bd533 100644 --- a/providers/implementations/ciphers/cipher_rc2.c +++ b/providers/implementations/ciphers/cipher_rc2.c @@ -226,7 +226,7 @@ static int alg##_##kbits##_##lcmode##_get_params(OSSL_PARAM params[]) \ flags, kbits, blkbits, ivbits); \ } \ static OSSL_FUNC_cipher_newctx_fn alg##_##kbits##_##lcmode##_newctx; \ -static void * alg##_##kbits##_##lcmode##_newctx(void *provctx) \ +static void *alg##_##kbits##_##lcmode##_newctx(void *provctx) \ { \ PROV_##UCALG##_CTX *ctx; \ if (!ossl_prov_is_running()) \ diff --git a/providers/implementations/ciphers/cipher_rc4.c b/providers/implementations/ciphers/cipher_rc4.c index 9107500a14..733524d36f 100644 --- a/providers/implementations/ciphers/cipher_rc4.c +++ b/providers/implementations/ciphers/cipher_rc4.c @@ -76,7 +76,7 @@ static int alg##_##kbits##_get_params(OSSL_PARAM params[]) \ kbits, blkbits, ivbits); \ } \ static OSSL_FUNC_cipher_newctx_fn alg##_##kbits##_newctx; \ -static void * alg##_##kbits##_newctx(void *provctx) \ +static void *alg##_##kbits##_newctx(void *provctx) \ { \ PROV_##UCALG##_CTX *ctx; \ if (!ossl_prov_is_running()) \ diff --git a/providers/implementations/ciphers/cipher_rc5.c b/providers/implementations/ciphers/cipher_rc5.c index 5b68b25938..090b0488e5 100644 --- a/providers/implementations/ciphers/cipher_rc5.c +++ b/providers/implementations/ciphers/cipher_rc5.c @@ -136,7 +136,7 @@ static int alg##_##kbits##_##lcmode##_get_params(OSSL_PARAM params[]) \ flags, kbits, blkbits, ivbits); \ } \ static OSSL_FUNC_cipher_newctx_fn alg##_##kbits##_##lcmode##_newctx; \ -static void * alg##_##kbits##_##lcmode##_newctx(void *provctx) \ +static void *alg##_##kbits##_##lcmode##_newctx(void *provctx) \ { \ PROV_##UCALG##_CTX *ctx; \ if (!ossl_prov_is_running()) \ diff --git a/providers/implementations/rands/seeding/rand_unix.c b/providers/implementations/rands/seeding/rand_unix.c index ab77814a74..9a936d800d 100644 --- a/providers/implementations/rands/seeding/rand_unix.c +++ b/providers/implementations/rands/seeding/rand_unix.c @@ -510,7 +510,7 @@ static int wait_random_seeded(void) * So the handle might have been closed or even reused for opening * another file. */ -static int check_random_device(struct random_device * rd) +static int check_random_device(struct random_device *rd) { struct stat st; @@ -528,7 +528,7 @@ static int check_random_device(struct random_device * rd) static int get_random_device(size_t n) { struct stat st; - struct random_device * rd = &random_devices[n]; + struct random_device *rd = &random_devices[n]; /* reuse existing file descriptor if it is (still) valid */ if (check_random_device(rd)) @@ -557,7 +557,7 @@ static int get_random_device(size_t n) */ static void close_random_device(size_t n) { - struct random_device * rd = &random_devices[n]; + struct random_device *rd = &random_devices[n]; if (check_random_device(rd)) close(rd->fd); diff --git a/ssl/d1_lib.c b/ssl/d1_lib.c index a217480b08..8bbabd8f41 100644 --- a/ssl/d1_lib.c +++ b/ssl/d1_lib.c @@ -256,7 +256,7 @@ long dtls1_ctrl(SSL *ssl, int cmd, long larg, void *parg) return ret; } -static void dtls1_bio_set_next_timeout(BIO * bio, const DTLS1_STATE *d1) +static void dtls1_bio_set_next_timeout(BIO *bio, const DTLS1_STATE *d1) { struct timeval tv = ossl_time_to_timeval(d1->next_timeout); diff --git a/ssl/ssl_ciph.c b/ssl/ssl_ciph.c index 66bff8b239..35949f2dcc 100644 --- a/ssl/ssl_ciph.c +++ b/ssl/ssl_ciph.c @@ -114,7 +114,7 @@ static const ssl_cipher_table ssl_cipher_table_auth[] = { /* *INDENT-ON* */ /* Utility function for table lookup */ -static int ssl_cipher_info_find(const ssl_cipher_table * table, +static int ssl_cipher_info_find(const ssl_cipher_table *table, size_t table_cnt, uint32_t mask) { size_t i; diff --git a/ssl/ssl_conf.c b/ssl/ssl_conf.c index 442e852c1b..3142370016 100644 --- a/ssl/ssl_conf.c +++ b/ssl/ssl_conf.c @@ -855,7 +855,7 @@ static int ssl_conf_cmd_skip_prefix(SSL_CONF_CTX *cctx, const char **pcmd) } /* Determine if a command is allowed according to cctx flags */ -static int ssl_conf_cmd_allowed(SSL_CONF_CTX *cctx, const ssl_conf_cmd_tbl * t) +static int ssl_conf_cmd_allowed(SSL_CONF_CTX *cctx, const ssl_conf_cmd_tbl *t) { unsigned int tfl = t->flags; unsigned int cfl = cctx->flags; @@ -893,7 +893,7 @@ static const ssl_conf_cmd_tbl *ssl_conf_cmd_lookup(SSL_CONF_CTX *cctx, return NULL; } -static int ctrl_switch_option(SSL_CONF_CTX *cctx, const ssl_conf_cmd_tbl * cmd) +static int ctrl_switch_option(SSL_CONF_CTX *cctx, const ssl_conf_cmd_tbl *cmd) { /* Find index of command in table */ size_t idx = cmd - ssl_conf_cmds; diff --git a/ssl/ssl_init.c b/ssl/ssl_init.c index cef57356c5..a2d7595089 100644 --- a/ssl/ssl_init.c +++ b/ssl/ssl_init.c @@ -88,7 +88,7 @@ static void ssl_library_stop(void) * called prior to any threads making calls to any OpenSSL functions, * i.e. passing a non-null settings value is assumed to be single-threaded. */ -int OPENSSL_init_ssl(uint64_t opts, const OPENSSL_INIT_SETTINGS * settings) +int OPENSSL_init_ssl(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings) { static int stoperrset = 0; diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 5bfd8cc4ce..b7fa9d78f7 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -6197,13 +6197,13 @@ const STACK_OF(SCT) *SSL_get0_peer_scts(SSL *s) return NULL; } -static int ct_permissive(const CT_POLICY_EVAL_CTX * ctx, +static int ct_permissive(const CT_POLICY_EVAL_CTX *ctx, const STACK_OF(SCT) *scts, void *unused_arg) { return 1; } -static int ct_strict(const CT_POLICY_EVAL_CTX * ctx, +static int ct_strict(const CT_POLICY_EVAL_CTX *ctx, const STACK_OF(SCT) *scts, void *unused_arg) { int count = scts != NULL ? sk_SCT_num(scts) : 0; @@ -6424,7 +6424,7 @@ int SSL_CTX_set_ctlog_list_file(SSL_CTX *ctx, const char *path) return CTLOG_STORE_load_file(ctx->ctlog_store, path); } -void SSL_CTX_set0_ctlog_store(SSL_CTX *ctx, CTLOG_STORE * logs) +void SSL_CTX_set0_ctlog_store(SSL_CTX *ctx, CTLOG_STORE *logs) { CTLOG_STORE_free(ctx->ctlog_store); ctx->ctlog_store = logs; diff --git a/ssl/statem/statem_clnt.c b/ssl/statem/statem_clnt.c index f2dec2fc0f..92c00ce4ae 100644 --- a/ssl/statem/statem_clnt.c +++ b/ssl/statem/statem_clnt.c @@ -3373,7 +3373,7 @@ int ossl_gost18_cke_cipher_nid(const SSL_CONNECTION *s) int ossl_gost_ukm(const SSL_CONNECTION *s, unsigned char *dgst_buf) { - EVP_MD_CTX * hash = NULL; + EVP_MD_CTX *hash = NULL; unsigned int md_len; SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s); const EVP_MD *md = ssl_evp_md_fetch(sctx->libctx, NID_id_GostR3411_2012_256, diff --git a/test/afalgtest.c b/test/afalgtest.c index 02947c1ed3..429e2da3c9 100644 --- a/test/afalgtest.c +++ b/test/afalgtest.c @@ -112,7 +112,7 @@ static int test_afalg_aes_cbc(int keysize_idx) static int test_pr16743(void) { int ret = 0; - const EVP_CIPHER * cipher; + const EVP_CIPHER *cipher; EVP_CIPHER_CTX *ctx; if (!TEST_true(ENGINE_init(e))) diff --git a/test/drbgtest.c b/test/drbgtest.c index 29583b568f..bb2a9f1b99 100644 --- a/test/drbgtest.c +++ b/test/drbgtest.c @@ -299,7 +299,7 @@ typedef struct drbg_fork_result_st { * This simplifies finding duplicate random output and makes * the printout in case of an error more readable. */ -static int compare_drbg_fork_result(const void * left, const void * right) +static int compare_drbg_fork_result(const void *left, const void *right) { int result; const drbg_fork_result *l = left; @@ -322,7 +322,7 @@ static int compare_drbg_fork_result(const void * left, const void * right) * * Used for finding collisions in two-byte chunks */ -static int compare_rand_chunk(const void * left, const void * right) +static int compare_rand_chunk(const void *left, const void *right) { return memcmp(left, right, 2); } diff --git a/test/ectest.c b/test/ectest.c index 87d81741b8..70df89ee2f 100644 --- a/test/ectest.c +++ b/test/ectest.c @@ -2457,7 +2457,7 @@ static int ec_point_hex2point_test(int id) EC_GROUP *group = NULL; const EC_POINT *G = NULL; EC_POINT *P = NULL; - BN_CTX * bnctx = NULL; + BN_CTX *bnctx = NULL; /* Do some setup */ nid = curves[id].nid; diff --git a/test/evp_test.c b/test/evp_test.c index 5a6cdd876d..ea1ca65bcd 100644 --- a/test/evp_test.c +++ b/test/evp_test.c @@ -52,13 +52,13 @@ struct evp_test_method_st { /* Name of test as it appears in file */ const char *name; /* Initialise test for "alg" */ - int (*init) (EVP_TEST * t, const char *alg); + int (*init) (EVP_TEST *t, const char *alg); /* Clean up method */ - void (*cleanup) (EVP_TEST * t); + void (*cleanup) (EVP_TEST *t); /* Test specific name value pair processing */ - int (*parse) (EVP_TEST * t, const char *name, const char *value); + int (*parse) (EVP_TEST *t, const char *name, const char *value); /* Run the test itself */ - int (*run_test) (EVP_TEST * t); + int (*run_test) (EVP_TEST *t); }; /* Linked list of named keys. */ diff --git a/test/ocspapitest.c b/test/ocspapitest.c index bc0c965d85..a448731380 100644 --- a/test/ocspapitest.c +++ b/test/ocspapitest.c @@ -193,7 +193,7 @@ static int test_ocsp_url_svcloc_new(void) }; X509 *issuer = NULL; - X509_EXTENSION * ext = NULL; + X509_EXTENSION *ext = NULL; int ret = 0; if (!TEST_true(get_cert(&issuer))) diff --git a/test/sslapitest.c b/test/sslapitest.c index ed8eb2514b..756675c1dc 100644 --- a/test/sslapitest.c +++ b/test/sslapitest.c @@ -9549,7 +9549,7 @@ static int test_pluggable_group(int idx) */ static int create_cert_key(int idx, char *certfilename, char *privkeyfilename) { - EVP_PKEY_CTX * evpctx = EVP_PKEY_CTX_new_from_name(libctx, + EVP_PKEY_CTX *evpctx = EVP_PKEY_CTX_new_from_name(libctx, (idx == 0) ? "xorhmacsig" : "xorhmacsha2sig", NULL); EVP_PKEY *pkey = NULL; X509 *x509 = X509_new(); -- 2.34.1