Skip to content

Commit

Permalink
Make header guards of internal headers consistent
Browse files Browse the repository at this point in the history
Not all of them, only those that didn't leak into a public header...
Yes.
  • Loading branch information
tb committed Nov 26, 2022
1 parent 19e8891 commit 384d7c0
Show file tree
Hide file tree
Showing 16 changed files with 55 additions and 56 deletions.
8 changes: 4 additions & 4 deletions src/lib/libcrypto/aes/aes_local.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: aes_local.h,v 1.1 2022/11/26 16:08:50 tb Exp $ */
/* $OpenBSD: aes_local.h,v 1.2 2022/11/26 17:23:17 tb Exp $ */
/* ====================================================================
* Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
*
Expand Down Expand Up @@ -49,8 +49,8 @@
*
*/

#ifndef HEADER_AES_LOCL_H
#define HEADER_AES_LOCL_H
#ifndef HEADER_AES_LOCAL_H
#define HEADER_AES_LOCAL_H

#include <openssl/opensslconf.h>

Expand Down Expand Up @@ -80,4 +80,4 @@ typedef unsigned char u8;

__END_HIDDEN_DECLS

#endif /* !HEADER_AES_LOCL_H */
#endif /* !HEADER_AES_LOCAL_H */
8 changes: 4 additions & 4 deletions src/lib/libcrypto/bn/bn_local.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: bn_local.h,v 1.1 2022/11/26 16:08:51 tb Exp $ */
/* $OpenBSD: bn_local.h,v 1.2 2022/11/26 17:23:17 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young ([email protected])
* All rights reserved.
*
Expand Down Expand Up @@ -109,8 +109,8 @@
*
*/

#ifndef HEADER_BN_LCL_H
#define HEADER_BN_LCL_H
#ifndef HEADER_BN_LOCAL_H
#define HEADER_BN_LOCAL_H

#include <openssl/opensslconf.h>

Expand Down Expand Up @@ -564,4 +564,4 @@ int bn_is_perfect_square(int *out_perfect, const BIGNUM *n, BN_CTX *ctx);
int bn_is_prime_bpsw(int *is_prime, const BIGNUM *n, BN_CTX *in_ctx);

__END_HIDDEN_DECLS
#endif
#endif /* !HEADER_BN_LOCAL_H */
8 changes: 4 additions & 4 deletions src/lib/libcrypto/camellia/cmll_local.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: cmll_local.h,v 1.1 2022/11/26 16:08:51 tb Exp $ */
/* $OpenBSD: cmll_local.h,v 1.2 2022/11/26 17:23:17 tb Exp $ */
/* ====================================================================
* Copyright 2006 NTT (Nippon Telegraph and Telephone Corporation) .
* ALL RIGHTS RESERVED.
Expand Down Expand Up @@ -65,8 +65,8 @@
* ====================================================================
*/

#ifndef HEADER_CAMELLIA_LOCL_H
#define HEADER_CAMELLIA_LOCL_H
#ifndef HEADER_CAMELLIA_LOCAL_H
#define HEADER_CAMELLIA_LOCAL_H

__BEGIN_HIDDEN_DECLS

Expand All @@ -86,4 +86,4 @@ void Camellia_DecryptBlock(int keyBitLength, const u8 ciphertext[],

__END_HIDDEN_DECLS

#endif /* #ifndef HEADER_CAMELLIA_LOCL_H */
#endif /* !HEADER_CAMELLIA_LOCAL_H */
8 changes: 4 additions & 4 deletions src/lib/libcrypto/cms/cms_local.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: cms_local.h,v 1.1 2022/11/26 16:08:51 tb Exp $ */
/* $OpenBSD: cms_local.h,v 1.2 2022/11/26 17:23:17 tb Exp $ */
/*
* Written by Dr Stephen N Henson ([email protected]) for the OpenSSL
* project.
Expand Down Expand Up @@ -52,8 +52,8 @@
* ====================================================================
*/

#ifndef HEADER_CMS_LCL_H
#define HEADER_CMS_LCL_H
#ifndef HEADER_CMS_LOCAL_H
#define HEADER_CMS_LOCAL_H

#include <openssl/x509.h>

Expand Down Expand Up @@ -481,4 +481,4 @@ extern const ASN1_ITEM CMS_RevocationInfoChoice_it;
extern const ASN1_ITEM CMS_SignedData_it;
extern const ASN1_ITEM CMS_CompressedData_it;

#endif
#endif /* !HEADER_CMS_LOCAL_H */
6 changes: 3 additions & 3 deletions src/lib/libcrypto/constant_time.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
* [including the GNU Public Licence.]
*/

#ifndef HEADER_CONSTANT_TIME_LOCL_H
# define HEADER_CONSTANT_TIME_LOCL_H
#ifndef HEADER_CONSTANT_TIME_H
#define HEADER_CONSTANT_TIME_H

__BEGIN_HIDDEN_DECLS

Expand Down Expand Up @@ -204,4 +204,4 @@ void err_clear_last_constant_time(int clear);

__END_HIDDEN_DECLS

#endif /* HEADER_CONSTANT_TIME_LOCL_H */
#endif /* !HEADER_CONSTANT_TIME_H */
8 changes: 4 additions & 4 deletions src/lib/libcrypto/ecdh/ech_local.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: ech_local.h,v 1.1 2022/11/26 16:08:52 tb Exp $ */
/* $OpenBSD: ech_local.h,v 1.2 2022/11/26 17:23:17 tb Exp $ */
/* ====================================================================
* Copyright (c) 2000-2005 The OpenSSL Project. All rights reserved.
*
Expand Down Expand Up @@ -53,8 +53,8 @@
*
*/

#ifndef HEADER_ECH_LOCL_H
#define HEADER_ECH_LOCL_H
#ifndef HEADER_ECH_LOCAL_H
#define HEADER_ECH_LOCAL_H

#include <openssl/ecdh.h>

Expand Down Expand Up @@ -96,4 +96,4 @@ int ecdh_KDF_X9_63(unsigned char *out, size_t outlen, const unsigned char *Z,

__END_HIDDEN_DECLS

#endif /* HEADER_ECH_LOCL_H */
#endif /* !HEADER_ECH_LOCAL_H */
8 changes: 4 additions & 4 deletions src/lib/libcrypto/ecdsa/ecs_local.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: ecs_local.h,v 1.1 2022/11/26 16:08:52 tb Exp $ */
/* $OpenBSD: ecs_local.h,v 1.2 2022/11/26 17:23:17 tb Exp $ */
/*
* Written by Nils Larsch for the OpenSSL project
*/
Expand Down Expand Up @@ -56,8 +56,8 @@
*
*/

#ifndef HEADER_ECS_LOCL_H
#define HEADER_ECS_LOCL_H
#ifndef HEADER_ECS_LOCAL_H
#define HEADER_ECS_LOCAL_H

#include <openssl/ecdsa.h>

Expand Down Expand Up @@ -96,4 +96,4 @@ ECDSA_SIG *ossl_ecdsa_sign_sig(const unsigned char *dgst, int dgst_len,

__END_HIDDEN_DECLS

#endif /* HEADER_ECS_LOCL_H */
#endif /* !HEADER_ECS_LOCAL_H */
8 changes: 4 additions & 4 deletions src/lib/libcrypto/evp/evp_local.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: evp_local.h,v 1.1 2022/11/26 16:08:52 tb Exp $ */
/* $OpenBSD: evp_local.h,v 1.2 2022/11/26 17:23:17 tb Exp $ */
/* Written by Dr Stephen N Henson ([email protected]) for the OpenSSL
* project 2000.
*/
Expand Down Expand Up @@ -56,8 +56,8 @@
*
*/

#ifndef HEADER_EVP_LOCL_H
#define HEADER_EVP_LOCL_H
#ifndef HEADER_EVP_LOCAL_H
#define HEADER_EVP_LOCAL_H

__BEGIN_HIDDEN_DECLS

Expand Down Expand Up @@ -321,4 +321,4 @@ int EVP_PKEY_CTX_md(EVP_PKEY_CTX *ctx, int optype, int cmd, const char *md_name)

__END_HIDDEN_DECLS

#endif /* !HEADER_EVP_LOCL_H */
#endif /* !HEADER_EVP_LOCAL_H */
8 changes: 4 additions & 4 deletions src/lib/libcrypto/gost/gost_local.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: gost_local.h,v 1.1 2022/11/26 16:08:53 tb Exp $ */
/* $OpenBSD: gost_local.h,v 1.2 2022/11/26 17:23:18 tb Exp $ */
/*
* Copyright (c) 2014 Dmitry Eremin-Solenikov <[email protected]>
* Copyright (c) 2005-2006 Cryptocom LTD
Expand Down Expand Up @@ -49,8 +49,8 @@
* ====================================================================
*/

#ifndef HEADER_GOST_LOCL_H
#define HEADER_GOST_LOCL_H
#ifndef HEADER_GOST_LOCAL_H
#define HEADER_GOST_LOCAL_H

#include <openssl/ec.h>
#include <openssl/ecdsa.h>
Expand Down Expand Up @@ -114,4 +114,4 @@ extern int GostR3410_512_param_id(const char *value);

__END_HIDDEN_DECLS

#endif
#endif /* !HEADER_GOST_LOCAL_H */
4 changes: 2 additions & 2 deletions src/lib/libcrypto/pkcs12/pkcs12_local.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: pkcs12_local.h,v 1.2 2022/09/11 17:30:13 tb Exp $ */
/* $OpenBSD: pkcs12_local.h,v 1.3 2022/11/26 17:23:18 tb Exp $ */
/* Written by Dr Stephen N Henson ([email protected]) for the OpenSSL
* project 1999.
*/
Expand Down Expand Up @@ -98,4 +98,4 @@ struct pkcs12_bag_st {

__END_HIDDEN_DECLS

#endif /* HEADER_PKCS12_LOCAL_H */
#endif /* !HEADER_PKCS12_LOCAL_H */
9 changes: 4 additions & 5 deletions src/lib/libcrypto/sm2/sm2_local.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: sm2_local.h,v 1.1 2022/11/26 16:08:54 tb Exp $ */
/* $OpenBSD: sm2_local.h,v 1.2 2022/11/26 17:23:18 tb Exp $ */
/*
* Copyright (c) 2017, 2019 Ribose Inc
*
Expand All @@ -15,8 +15,8 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

#ifndef HEADER_SM2_LOCL_H
#define HEADER_SM2_LOCL_H
#ifndef HEADER_SM2_LOCAL_H
#define HEADER_SM2_LOCAL_H

#include <openssl/ec.h>
#include <openssl/ecdsa.h>
Expand All @@ -39,5 +39,4 @@ int sm2_do_verify(const EC_KEY *key, const EVP_MD *digest,

__END_HIDDEN_DECLS

#endif

#endif /* !HEADER_SM2_LOCAL_H */
4 changes: 2 additions & 2 deletions src/lib/libcrypto/ts/ts_local.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: ts_local.h,v 1.2 2022/09/11 17:31:19 tb Exp $ */
/* $OpenBSD: ts_local.h,v 1.3 2022/11/26 17:23:18 tb Exp $ */
/* Written by Zoltan Glozik ([email protected]) for the OpenSSL
* project 2002, 2003, 2004.
*/
Expand Down Expand Up @@ -313,4 +313,4 @@ ESS_SIGNING_CERT_V2 *ESS_SIGNING_CERT_V2_dup(ESS_SIGNING_CERT_V2 *a);

__END_HIDDEN_DECLS

#endif /* HEADER_TS_LOCAL_H */
#endif /* !HEADER_TS_LOCAL_H */
8 changes: 4 additions & 4 deletions src/lib/libcrypto/ui/ui_local.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: ui_local.h,v 1.1 2022/11/26 16:08:54 tb Exp $ */
/* $OpenBSD: ui_local.h,v 1.2 2022/11/26 17:23:18 tb Exp $ */

/* Written by Richard Levitte ([email protected]) for the OpenSSL
* project 2001.
Expand Down Expand Up @@ -57,8 +57,8 @@
*
*/

#ifndef HEADER_UI_LOCL_H
#define HEADER_UI_LOCL_H
#ifndef HEADER_UI_LOCAL_H
#define HEADER_UI_LOCAL_H

#include <openssl/ui.h>
#include <openssl/crypto.h>
Expand Down Expand Up @@ -149,4 +149,4 @@ struct ui_st {

__END_HIDDEN_DECLS

#endif
#endif /* !HEADER_UI_LOCAL_H */
8 changes: 4 additions & 4 deletions src/lib/libcrypto/x509/x509_local.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: x509_local.h,v 1.1 2022/11/26 16:08:54 tb Exp $ */
/* $OpenBSD: x509_local.h,v 1.2 2022/11/26 17:23:18 tb Exp $ */
/* Written by Dr Stephen N Henson ([email protected]) for the OpenSSL
* project 2013.
*/
Expand Down Expand Up @@ -56,8 +56,8 @@
*
*/

#ifndef HEADER_X509_LCL_H
#define HEADER_X509_LCL_H
#ifndef HEADER_X509_LOCAL_H
#define HEADER_X509_LOCAL_H

__BEGIN_HIDDEN_DECLS

Expand Down Expand Up @@ -377,4 +377,4 @@ int name_cmp(const char *name, const char *cmp);

__END_HIDDEN_DECLS

#endif /* !HEADER_X509_LCL_H */
#endif /* !HEADER_X509_LOCAL_H */
4 changes: 2 additions & 2 deletions src/lib/libssl/dtls_local.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: dtls_local.h,v 1.1 2022/11/26 16:08:55 tb Exp $ */
/* $OpenBSD: dtls_local.h,v 1.2 2022/11/26 17:23:18 tb Exp $ */
/*
* DTLS implementation written by Nagendra Modadugu
* ([email protected]) for the OpenSSL project 2005.
Expand Down Expand Up @@ -229,4 +229,4 @@ int dtls1_get_record(SSL *s);

__END_HIDDEN_DECLS

#endif
#endif /* !HEADER_DTLS_LOCL_H */
4 changes: 2 additions & 2 deletions src/lib/libssl/ssl_local.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: ssl_local.h,v 1.1 2022/11/26 16:08:55 tb Exp $ */
/* $OpenBSD: ssl_local.h,v 1.2 2022/11/26 17:23:18 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young ([email protected])
* All rights reserved.
*
Expand Down Expand Up @@ -1535,4 +1535,4 @@ int tls_process_peer_certs(SSL *s, STACK_OF(X509) *peer_certs);

__END_HIDDEN_DECLS

#endif
#endif /* !HEADER_SSL_LOCL_H */

0 comments on commit 384d7c0

Please sign in to comment.