From 10e340b287123836bdb25526c3eea6a9e6df4fc4 Mon Sep 17 00:00:00 2001 From: jsing Date: Sun, 16 May 2021 14:10:43 +0000 Subject: [PATCH] Make local header inclusion consistent. Consistently include local headers in the same location, using the same grouping/sorting across all files. --- lib/libssl/d1_both.c | 5 ++--- lib/libssl/s3_cbc.c | 6 +++--- lib/libssl/ssl_asn1.c | 5 ++--- lib/libssl/ssl_clnt.c | 5 ++--- lib/libssl/ssl_lib.c | 5 ++--- lib/libssl/ssl_packet.c | 5 ++--- lib/libssl/ssl_pkt.c | 5 ++--- lib/libssl/ssl_rsa.c | 6 +++--- lib/libssl/ssl_srvr.c | 5 ++--- lib/libssl/ssl_tlsext.c | 5 ++--- lib/libssl/ssl_transcript.c | 6 +++--- lib/libssl/t1_enc.c | 5 ++--- lib/libssl/t1_lib.c | 5 ++--- lib/libssl/tls13_buffer.c | 5 ++--- lib/libssl/tls13_client.c | 5 ++--- lib/libssl/tls13_record.c | 3 +-- lib/libssl/tls13_record_layer.c | 3 +-- lib/libssl/tls13_server.c | 3 +-- 18 files changed, 36 insertions(+), 51 deletions(-) diff --git a/lib/libssl/d1_both.c b/lib/libssl/d1_both.c index 22bd3cec2ab..9b06d379471 100644 --- a/lib/libssl/d1_both.c +++ b/lib/libssl/d1_both.c @@ -1,4 +1,4 @@ -/* $OpenBSD: d1_both.c,v 1.71 2021/05/16 13:56:30 jsing Exp $ */ +/* $OpenBSD: d1_both.c,v 1.72 2021/05/16 14:10:43 jsing Exp $ */ /* * DTLS implementation written by Nagendra Modadugu * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. @@ -117,8 +117,6 @@ #include #include -#include "ssl_locl.h" - #include #include #include @@ -127,6 +125,7 @@ #include "bytestring.h" #include "dtls_locl.h" #include "pqueue.h" +#include "ssl_locl.h" #define RSMBLY_BITMASK_SIZE(msg_len) (((msg_len) + 7) / 8) diff --git a/lib/libssl/s3_cbc.c b/lib/libssl/s3_cbc.c index 4f84c9485bd..1c0286f0875 100644 --- a/lib/libssl/s3_cbc.c +++ b/lib/libssl/s3_cbc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: s3_cbc.c,v 1.23 2020/10/03 17:35:16 jsing Exp $ */ +/* $OpenBSD: s3_cbc.c,v 1.24 2021/05/16 14:10:43 jsing Exp $ */ /* ==================================================================== * Copyright (c) 2012 The OpenSSL Project. All rights reserved. * @@ -53,11 +53,11 @@ * */ -#include "ssl_locl.h" - #include #include +#include "ssl_locl.h" + /* MAX_HASH_BIT_COUNT_BYTES is the maximum number of bytes in the hash's length * field. (SHA-384/512 have 128-bit length.) */ #define MAX_HASH_BIT_COUNT_BYTES 16 diff --git a/lib/libssl/ssl_asn1.c b/lib/libssl/ssl_asn1.c index cea2b31f476..6ff7ca54762 100644 --- a/lib/libssl/ssl_asn1.c +++ b/lib/libssl/ssl_asn1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_asn1.c,v 1.58 2021/03/29 18:24:04 tb Exp $ */ +/* $OpenBSD: ssl_asn1.c,v 1.59 2021/05/16 14:10:43 jsing Exp $ */ /* * Copyright (c) 2016 Joel Sing * @@ -20,9 +20,8 @@ #include #include -#include "ssl_locl.h" - #include "bytestring.h" +#include "ssl_locl.h" #define SSLASN1_TAG (CBS_ASN1_CONSTRUCTED | CBS_ASN1_CONTEXT_SPECIFIC) #define SSLASN1_TIME_TAG (SSLASN1_TAG | 1) diff --git a/lib/libssl/ssl_clnt.c b/lib/libssl/ssl_clnt.c index abfe5c7d60e..be9d6878d7e 100644 --- a/lib/libssl/ssl_clnt.c +++ b/lib/libssl/ssl_clnt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_clnt.c,v 1.98 2021/05/16 13:56:30 jsing Exp $ */ +/* $OpenBSD: ssl_clnt.c,v 1.99 2021/05/16 14:10:43 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -152,8 +152,6 @@ #include #include -#include "ssl_locl.h" - #include #include #include @@ -172,6 +170,7 @@ #include "bytestring.h" #include "dtls_locl.h" +#include "ssl_locl.h" #include "ssl_sigalgs.h" #include "ssl_tlsext.h" diff --git a/lib/libssl/ssl_lib.c b/lib/libssl/ssl_lib.c index c6c499eb024..4fa011ebc53 100644 --- a/lib/libssl/ssl_lib.c +++ b/lib/libssl/ssl_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_lib.c,v 1.258 2021/05/16 13:56:31 jsing Exp $ */ +/* $OpenBSD: ssl_lib.c,v 1.259 2021/05/16 14:10:43 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -146,8 +146,6 @@ #include -#include "ssl_locl.h" - #include #include #include @@ -162,6 +160,7 @@ #include "bytestring.h" #include "dtls_locl.h" +#include "ssl_locl.h" #include "ssl_sigalgs.h" const char *SSL_version_str = OPENSSL_VERSION_TEXT; diff --git a/lib/libssl/ssl_packet.c b/lib/libssl/ssl_packet.c index b383fe83e9b..0a0c5a29df0 100644 --- a/lib/libssl/ssl_packet.c +++ b/lib/libssl/ssl_packet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_packet.c,v 1.10 2021/02/25 17:06:05 jsing Exp $ */ +/* $OpenBSD: ssl_packet.c,v 1.11 2021/05/16 14:10:43 jsing Exp $ */ /* * Copyright (c) 2016, 2017 Joel Sing * @@ -15,9 +15,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include "ssl_locl.h" - #include "bytestring.h" +#include "ssl_locl.h" static int ssl_is_sslv2_client_hello(CBS *header) diff --git a/lib/libssl/ssl_pkt.c b/lib/libssl/ssl_pkt.c index ba59aa32371..ae47055079c 100644 --- a/lib/libssl/ssl_pkt.c +++ b/lib/libssl/ssl_pkt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_pkt.c,v 1.42 2021/05/02 17:46:58 jsing Exp $ */ +/* $OpenBSD: ssl_pkt.c,v 1.43 2021/05/16 14:10:43 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -112,12 +112,11 @@ #include #include -#include "ssl_locl.h" - #include #include #include "bytestring.h" +#include "ssl_locl.h" static int do_ssl3_write(SSL *s, int type, const unsigned char *buf, unsigned int len); diff --git a/lib/libssl/ssl_rsa.c b/lib/libssl/ssl_rsa.c index 18ae5307d36..bada2482f8d 100644 --- a/lib/libssl/ssl_rsa.c +++ b/lib/libssl/ssl_rsa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_rsa.c,v 1.32 2021/03/19 19:51:07 tb Exp $ */ +/* $OpenBSD: ssl_rsa.c,v 1.33 2021/05/16 14:10:43 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -58,14 +58,14 @@ #include -#include "ssl_locl.h" - #include #include #include #include #include +#include "ssl_locl.h" + static int ssl_set_cert(CERT *c, X509 *x509); static int ssl_set_pkey(CERT *c, EVP_PKEY *pkey); static int use_certificate_chain_bio(BIO *in, CERT *cert, diff --git a/lib/libssl/ssl_srvr.c b/lib/libssl/ssl_srvr.c index 1d63c21af13..c4bcd228ef1 100644 --- a/lib/libssl/ssl_srvr.c +++ b/lib/libssl/ssl_srvr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_srvr.c,v 1.110 2021/05/16 13:56:31 jsing Exp $ */ +/* $OpenBSD: ssl_srvr.c,v 1.111 2021/05/16 14:10:43 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -150,8 +150,6 @@ #include -#include "ssl_locl.h" - #include #include #include @@ -169,6 +167,7 @@ #include "bytestring.h" #include "dtls_locl.h" +#include "ssl_locl.h" #include "ssl_sigalgs.h" #include "ssl_tlsext.h" diff --git a/lib/libssl/ssl_tlsext.c b/lib/libssl/ssl_tlsext.c index be3756a9fef..2bf7d5a051a 100644 --- a/lib/libssl/ssl_tlsext.c +++ b/lib/libssl/ssl_tlsext.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_tlsext.c,v 1.91 2021/05/16 08:24:21 jsing Exp $ */ +/* $OpenBSD: ssl_tlsext.c,v 1.92 2021/05/16 14:10:43 jsing Exp $ */ /* * Copyright (c) 2016, 2017, 2019 Joel Sing * Copyright (c) 2017 Doug Hogan @@ -22,9 +22,8 @@ #include #include -#include "ssl_locl.h" - #include "bytestring.h" +#include "ssl_locl.h" #include "ssl_sigalgs.h" #include "ssl_tlsext.h" diff --git a/lib/libssl/ssl_transcript.c b/lib/libssl/ssl_transcript.c index 688f6dca433..47aa15adc20 100644 --- a/lib/libssl/ssl_transcript.c +++ b/lib/libssl/ssl_transcript.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_transcript.c,v 1.4 2021/05/02 16:00:33 jsing Exp $ */ +/* $OpenBSD: ssl_transcript.c,v 1.5 2021/05/16 14:10:43 jsing Exp $ */ /* * Copyright (c) 2017 Joel Sing * @@ -15,10 +15,10 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include "ssl_locl.h" - #include +#include "ssl_locl.h" + int tls1_transcript_hash_init(SSL *s) { diff --git a/lib/libssl/t1_enc.c b/lib/libssl/t1_enc.c index 9dc4a0bfb48..16ed5fa65f8 100644 --- a/lib/libssl/t1_enc.c +++ b/lib/libssl/t1_enc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: t1_enc.c,v 1.146 2021/05/16 13:56:31 jsing Exp $ */ +/* $OpenBSD: t1_enc.c,v 1.147 2021/05/16 14:10:43 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -138,14 +138,13 @@ #include #include -#include "ssl_locl.h" - #include #include #include #include #include "dtls_locl.h" +#include "ssl_locl.h" void tls1_cleanup_key_block(SSL *s) diff --git a/lib/libssl/t1_lib.c b/lib/libssl/t1_lib.c index 7c9aba90d02..78ac1f5accc 100644 --- a/lib/libssl/t1_lib.c +++ b/lib/libssl/t1_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: t1_lib.c,v 1.179 2020/12/05 19:33:38 tb Exp $ */ +/* $OpenBSD: t1_lib.c,v 1.180 2021/05/16 14:10:43 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -116,9 +116,8 @@ #include #include -#include "ssl_locl.h" - #include "bytestring.h" +#include "ssl_locl.h" #include "ssl_sigalgs.h" #include "ssl_tlsext.h" diff --git a/lib/libssl/tls13_buffer.c b/lib/libssl/tls13_buffer.c index bc10abded2c..49f2f1e21bc 100644 --- a/lib/libssl/tls13_buffer.c +++ b/lib/libssl/tls13_buffer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls13_buffer.c,v 1.3 2020/03/10 17:11:25 jsing Exp $ */ +/* $OpenBSD: tls13_buffer.c,v 1.4 2021/05/16 14:10:43 jsing Exp $ */ /* * Copyright (c) 2018, 2019 Joel Sing * @@ -15,9 +15,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include "ssl_locl.h" - #include "bytestring.h" +#include "ssl_locl.h" #include "tls13_internal.h" struct tls13_buffer { diff --git a/lib/libssl/tls13_client.c b/lib/libssl/tls13_client.c index 05a6fbc862b..c7644645ff1 100644 --- a/lib/libssl/tls13_client.c +++ b/lib/libssl/tls13_client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls13_client.c,v 1.78 2021/05/16 10:55:17 jsing Exp $ */ +/* $OpenBSD: tls13_client.c,v 1.79 2021/05/16 14:10:43 jsing Exp $ */ /* * Copyright (c) 2018, 2019 Joel Sing * @@ -15,11 +15,10 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include "ssl_locl.h" - #include #include "bytestring.h" +#include "ssl_locl.h" #include "ssl_sigalgs.h" #include "ssl_tlsext.h" #include "tls13_handshake.h" diff --git a/lib/libssl/tls13_record.c b/lib/libssl/tls13_record.c index c856932b403..931671dd1ee 100644 --- a/lib/libssl/tls13_record.c +++ b/lib/libssl/tls13_record.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls13_record.c,v 1.6 2020/05/11 18:08:11 jsing Exp $ */ +/* $OpenBSD: tls13_record.c,v 1.7 2021/05/16 14:10:43 jsing Exp $ */ /* * Copyright (c) 2018, 2019 Joel Sing * @@ -16,7 +16,6 @@ */ #include "ssl_locl.h" - #include "tls13_internal.h" #include "tls13_record.h" diff --git a/lib/libssl/tls13_record_layer.c b/lib/libssl/tls13_record_layer.c index 4be4bad8602..cdb6695a54a 100644 --- a/lib/libssl/tls13_record_layer.c +++ b/lib/libssl/tls13_record_layer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls13_record_layer.c,v 1.59 2021/03/21 17:25:17 jsing Exp $ */ +/* $OpenBSD: tls13_record_layer.c,v 1.60 2021/05/16 14:10:43 jsing Exp $ */ /* * Copyright (c) 2018, 2019 Joel Sing * @@ -16,7 +16,6 @@ */ #include "ssl_locl.h" - #include "tls13_internal.h" #include "tls13_record.h" diff --git a/lib/libssl/tls13_server.c b/lib/libssl/tls13_server.c index a1c0e122a81..40454f8163c 100644 --- a/lib/libssl/tls13_server.c +++ b/lib/libssl/tls13_server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls13_server.c,v 1.75 2021/05/16 10:55:17 jsing Exp $ */ +/* $OpenBSD: tls13_server.c,v 1.76 2021/05/16 14:10:43 jsing Exp $ */ /* * Copyright (c) 2019, 2020 Joel Sing * Copyright (c) 2020 Bob Beck @@ -21,7 +21,6 @@ #include "ssl_locl.h" #include "ssl_sigalgs.h" #include "ssl_tlsext.h" - #include "tls13_handshake.h" #include "tls13_internal.h" -- 2.20.1