From f4dd87b514527924890e4f8124b772e9f4599feb Mon Sep 17 00:00:00 2001 From: jsing Date: Sun, 16 May 2021 08:24:21 +0000 Subject: [PATCH] Explicitly include in files using OPENSSL_NO_* Where a file references to OPENSSL_NO_* conditions, ensure that we explicitly include before any references, rather than relying on another header to pull this in. --- lib/libssl/d1_srtp.c | 3 ++- lib/libssl/s3_lib.c | 3 ++- lib/libssl/ssl_algs.c | 3 ++- lib/libssl/ssl_ciph.c | 3 ++- lib/libssl/ssl_clnt.c | 3 ++- lib/libssl/ssl_err.c | 3 ++- lib/libssl/ssl_lib.c | 3 ++- lib/libssl/ssl_locl.h | 3 ++- lib/libssl/ssl_sess.c | 3 ++- lib/libssl/ssl_sigalgs.c | 3 ++- lib/libssl/ssl_srvr.c | 10 ++++++---- lib/libssl/ssl_tlsext.c | 3 ++- lib/libssl/t1_enc.c | 3 ++- 13 files changed, 30 insertions(+), 16 deletions(-) diff --git a/lib/libssl/d1_srtp.c b/lib/libssl/d1_srtp.c index 1ea678a2185..2236e94e63c 100644 --- a/lib/libssl/d1_srtp.c +++ b/lib/libssl/d1_srtp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: d1_srtp.c,v 1.26 2020/10/11 02:44:27 tb Exp $ */ +/* $OpenBSD: d1_srtp.c,v 1.27 2021/05/16 08:24:21 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -118,6 +118,7 @@ #include #include +#include #include "ssl_locl.h" diff --git a/lib/libssl/s3_lib.c b/lib/libssl/s3_lib.c index 9dd6343b84e..2867d32deb4 100644 --- a/lib/libssl/s3_lib.c +++ b/lib/libssl/s3_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: s3_lib.c,v 1.208 2021/04/21 19:27:56 jsing Exp $ */ +/* $OpenBSD: s3_lib.c,v 1.209 2021/05/16 08:24:21 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -156,6 +156,7 @@ #include #include #include +#include #include "ssl_locl.h" #include "bytestring.h" diff --git a/lib/libssl/ssl_algs.c b/lib/libssl/ssl_algs.c index bb736c5de9f..5ed56b883ae 100644 --- a/lib/libssl/ssl_algs.c +++ b/lib/libssl/ssl_algs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_algs.c,v 1.28 2019/04/04 16:44:24 jsing Exp $ */ +/* $OpenBSD: ssl_algs.c,v 1.29 2021/05/16 08:24:21 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -60,6 +60,7 @@ #include #include +#include #include "ssl_locl.h" diff --git a/lib/libssl/ssl_ciph.c b/lib/libssl/ssl_ciph.c index 2db531abb12..bf22c4ed999 100644 --- a/lib/libssl/ssl_ciph.c +++ b/lib/libssl/ssl_ciph.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_ciph.c,v 1.122 2021/05/10 17:03:57 tb Exp $ */ +/* $OpenBSD: ssl_ciph.c,v 1.123 2021/05/16 08:24:21 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -143,6 +143,7 @@ #include #include +#include #ifndef OPENSSL_NO_ENGINE #include diff --git a/lib/libssl/ssl_clnt.c b/lib/libssl/ssl_clnt.c index 1874d22b946..8520bb7c05d 100644 --- a/lib/libssl/ssl_clnt.c +++ b/lib/libssl/ssl_clnt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_clnt.c,v 1.96 2021/05/02 17:46:58 jsing Exp $ */ +/* $OpenBSD: ssl_clnt.c,v 1.97 2021/05/16 08:24:21 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -161,6 +161,7 @@ #include #include #include +#include #ifndef OPENSSL_NO_ENGINE #include diff --git a/lib/libssl/ssl_err.c b/lib/libssl/ssl_err.c index cbc28982348..8507690f79f 100644 --- a/lib/libssl/ssl_err.c +++ b/lib/libssl/ssl_err.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_err.c,v 1.37 2020/01/21 05:19:02 jsing Exp $ */ +/* $OpenBSD: ssl_err.c,v 1.38 2021/05/16 08:24:21 jsing Exp $ */ /* ==================================================================== * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. * @@ -61,6 +61,7 @@ #include #include +#include #include #include "ssl_locl.h" diff --git a/lib/libssl/ssl_lib.c b/lib/libssl/ssl_lib.c index 2e3be8b13f3..3cb64cfb16c 100644 --- a/lib/libssl/ssl_lib.c +++ b/lib/libssl/ssl_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_lib.c,v 1.256 2021/05/10 17:05:26 tb Exp $ */ +/* $OpenBSD: ssl_lib.c,v 1.257 2021/05/16 08:24:21 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -153,6 +153,7 @@ #include #include #include +#include #include #ifndef OPENSSL_NO_ENGINE diff --git a/lib/libssl/ssl_locl.h b/lib/libssl/ssl_locl.h index 50ed47d7d81..ad21a3d28d8 100644 --- a/lib/libssl/ssl_locl.h +++ b/lib/libssl/ssl_locl.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_locl.h,v 1.343 2021/05/05 19:52:00 jsing Exp $ */ +/* $OpenBSD: ssl_locl.h,v 1.344 2021/05/16 08:24:21 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -152,6 +152,7 @@ #include #include + #include #include #include diff --git a/lib/libssl/ssl_sess.c b/lib/libssl/ssl_sess.c index 68298db8095..2e3300eb0fd 100644 --- a/lib/libssl/ssl_sess.c +++ b/lib/libssl/ssl_sess.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_sess.c,v 1.103 2021/05/10 17:07:24 tb Exp $ */ +/* $OpenBSD: ssl_sess.c,v 1.104 2021/05/16 08:24:21 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -136,6 +136,7 @@ */ #include +#include #ifndef OPENSSL_NO_ENGINE #include diff --git a/lib/libssl/ssl_sigalgs.c b/lib/libssl/ssl_sigalgs.c index 68bb6a38896..2612d5ac1d8 100644 --- a/lib/libssl/ssl_sigalgs.c +++ b/lib/libssl/ssl_sigalgs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_sigalgs.c,v 1.23 2021/03/10 18:27:02 jsing Exp $ */ +/* $OpenBSD: ssl_sigalgs.c,v 1.24 2021/05/16 08:24:21 jsing Exp $ */ /* * Copyright (c) 2018-2020 Bob Beck * @@ -18,6 +18,7 @@ #include #include +#include #include "bytestring.h" #include "ssl_locl.h" diff --git a/lib/libssl/ssl_srvr.c b/lib/libssl/ssl_srvr.c index f884ea316f9..5891424b260 100644 --- a/lib/libssl/ssl_srvr.c +++ b/lib/libssl/ssl_srvr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_srvr.c,v 1.108 2021/05/02 17:46:58 jsing Exp $ */ +/* $OpenBSD: ssl_srvr.c,v 1.109 2021/05/16 08:24:21 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -157,14 +157,16 @@ #include #include #include -#ifndef OPENSSL_NO_GOST -#include -#endif #include #include #include +#include #include +#ifndef OPENSSL_NO_GOST +#include +#endif + #include "bytestring.h" #include "ssl_sigalgs.h" #include "ssl_tlsext.h" diff --git a/lib/libssl/ssl_tlsext.c b/lib/libssl/ssl_tlsext.c index 0ed53f7ab2b..be3756a9fef 100644 --- a/lib/libssl/ssl_tlsext.c +++ b/lib/libssl/ssl_tlsext.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_tlsext.c,v 1.90 2021/04/22 18:27:53 tb Exp $ */ +/* $OpenBSD: ssl_tlsext.c,v 1.91 2021/05/16 08:24:21 jsing Exp $ */ /* * Copyright (c) 2016, 2017, 2019 Joel Sing * Copyright (c) 2017 Doug Hogan @@ -20,6 +20,7 @@ #include #include +#include #include "ssl_locl.h" diff --git a/lib/libssl/t1_enc.c b/lib/libssl/t1_enc.c index 57ddecbd77a..9cd0c331c18 100644 --- a/lib/libssl/t1_enc.c +++ b/lib/libssl/t1_enc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: t1_enc.c,v 1.144 2021/05/05 19:52:00 jsing Exp $ */ +/* $OpenBSD: t1_enc.c,v 1.145 2021/05/16 08:24:21 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -143,6 +143,7 @@ #include #include #include +#include void tls1_cleanup_key_block(SSL *s) -- 2.20.1