From 51323fa6826b3237000584a6db029fe173eebdd0 Mon Sep 17 00:00:00 2001 From: schwarze Date: Fri, 25 Aug 2023 12:37:33 +0000 Subject: [PATCH] KNF, no assembly change OK tb@ jsing@ --- lib/libcrypto/bio/bio.h | 22 +++++++++------------- lib/libcrypto/evp/evp.h | 12 ++++++------ 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/lib/libcrypto/bio/bio.h b/lib/libcrypto/bio/bio.h index 8450780f69e..b955524c456 100644 --- a/lib/libcrypto/bio/bio.h +++ b/lib/libcrypto/bio/bio.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bio.h,v 1.59 2023/07/28 09:58:30 tb Exp $ */ +/* $OpenBSD: bio.h,v 1.60 2023/08/25 12:37:33 schwarze Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -524,9 +524,8 @@ int BIO_ctrl_reset_read_request(BIO *b); /* void BIO_set_ex_free_func(BIO *bio,int idx,void (*cb)()); */ int BIO_set_ex_data(BIO *bio, int idx, void *data); void *BIO_get_ex_data(BIO *bio, int idx); -int -BIO_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, -CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); +int BIO_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, + CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); unsigned long BIO_number_read(BIO *bio); unsigned long BIO_number_written(BIO *bio); @@ -600,12 +599,10 @@ int BIO_dgram_non_fatal_error(int _error); int BIO_fd_should_retry(int i); int BIO_fd_non_fatal_error(int _error); -int -BIO_dump_cb(int (*cb)(const void *data, size_t len, void *u), -void *u, const char *s, int len); -int -BIO_dump_indent_cb(int (*cb)(const void *data, size_t len, void *u), -void *u, const char *s, int len, int indent); +int BIO_dump_cb(int (*cb)(const void *data, size_t len, void *u), + void *u, const char *s, int len); +int BIO_dump_indent_cb(int (*cb)(const void *data, size_t len, void *u), + void *u, const char *s, int len, int indent); int BIO_dump(BIO *b, const char *bytes, int len); int BIO_dump_indent(BIO *b, const char *bytes, int len, int indent); int BIO_dump_fp(FILE *fp, const char *s, int len); @@ -636,9 +633,8 @@ BIO *BIO_new_fd(int fd, int close_flag); BIO *BIO_new_connect(const char *host_port); BIO *BIO_new_accept(const char *host_port); -int -BIO_new_bio_pair(BIO **bio1, size_t writebuf1, -BIO **bio2, size_t writebuf2); +int BIO_new_bio_pair(BIO **bio1, size_t writebuf1, + BIO **bio2, size_t writebuf2); /* If successful, returns 1 and in *bio1, *bio2 two BIO pair endpoints. * Otherwise returns 0 and sets *bio1 and *bio2 to NULL. * Size 0 uses default value. diff --git a/lib/libcrypto/evp/evp.h b/lib/libcrypto/evp/evp.h index fa1a98d1a3d..381098b96b8 100644 --- a/lib/libcrypto/evp/evp.h +++ b/lib/libcrypto/evp/evp.h @@ -1,4 +1,4 @@ -/* $OpenBSD: evp.h,v 1.118 2023/04/25 18:39:12 tb Exp $ */ +/* $OpenBSD: evp.h,v 1.119 2023/08/25 12:37:33 schwarze Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -310,7 +310,7 @@ typedef struct evp_cipher_info_st { } EVP_CIPHER_INFO; /* Password based encryption function */ -typedef int (EVP_PBE_KEYGEN)(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, +typedef int EVP_PBE_KEYGEN(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, ASN1_TYPE *param, const EVP_CIPHER *cipher, const EVP_MD *md, int en_de); #ifndef OPENSSL_NO_RSA @@ -925,7 +925,7 @@ int PKCS5_v2_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, void PKCS5_PBE_add(void); -int EVP_PBE_CipherInit (ASN1_OBJECT *pbe_obj, const char *pass, int passlen, +int EVP_PBE_CipherInit(ASN1_OBJECT *pbe_obj, const char *pass, int passlen, ASN1_TYPE *param, EVP_CIPHER_CTX *ctx, int en_de); /* PBE type */ @@ -965,8 +965,8 @@ int EVP_PKEY_asn1_get0_info(int *ppkey_id, int *pkey_base_id, int *ppkey_flags, const char **pinfo, const char **ppem_str, const EVP_PKEY_ASN1_METHOD *ameth); -const EVP_PKEY_ASN1_METHOD* EVP_PKEY_get0_asn1(const EVP_PKEY *pkey); -EVP_PKEY_ASN1_METHOD* EVP_PKEY_asn1_new(int id, int flags, const char *pem_str, +const EVP_PKEY_ASN1_METHOD *EVP_PKEY_get0_asn1(const EVP_PKEY *pkey); +EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_new(int id, int flags, const char *pem_str, const char *info); void EVP_PKEY_asn1_copy(EVP_PKEY_ASN1_METHOD *dst, const EVP_PKEY_ASN1_METHOD *src); @@ -1073,7 +1073,7 @@ void EVP_PKEY_asn1_set_param_check(EVP_PKEY_ASN1_METHOD *ameth, #define EVP_PKEY_FLAG_SIGCTX_CUSTOM 4 const EVP_PKEY_METHOD *EVP_PKEY_meth_find(int type); -EVP_PKEY_METHOD* EVP_PKEY_meth_new(int id, int flags); +EVP_PKEY_METHOD *EVP_PKEY_meth_new(int id, int flags); void EVP_PKEY_meth_get0_info(int *ppkey_id, int *pflags, const EVP_PKEY_METHOD *meth); void EVP_PKEY_meth_copy(EVP_PKEY_METHOD *dst, const EVP_PKEY_METHOD *src); -- 2.20.1