summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2022-01-07 09:02:18 +0000
committertb <>2022-01-07 09:02:18 +0000
commit8d74ebda124d78459caefe10402685b3d761662a (patch)
tree63702983643c0f30ff2f3288b678033f62b0de2d
parentd93aa16238be38535b8d4292ab7ac0ac0a70ce70 (diff)
downloadopenbsd-8d74ebda124d78459caefe10402685b3d761662a.tar.gz
openbsd-8d74ebda124d78459caefe10402685b3d761662a.tar.bz2
openbsd-8d74ebda124d78459caefe10402685b3d761662a.zip
Add a new, mostly empty, bio_local.h and include it in the files
that will need it in the upcoming bump. discussed with jsing
-rw-r--r--src/lib/libcrypto/Makefile3
-rw-r--r--src/lib/libcrypto/asn1/bio_asn1.c4
-rw-r--r--src/lib/libcrypto/bio/bf_buff.c4
-rw-r--r--src/lib/libcrypto/bio/bf_nbio.c4
-rw-r--r--src/lib/libcrypto/bio/bf_null.c4
-rw-r--r--src/lib/libcrypto/bio/bio_cb.c4
-rw-r--r--src/lib/libcrypto/bio/bio_lib.c4
-rw-r--r--src/lib/libcrypto/bio/bio_local.h66
-rw-r--r--src/lib/libcrypto/bio/bio_meth.c4
-rw-r--r--src/lib/libcrypto/bio/bss_acpt.c4
-rw-r--r--src/lib/libcrypto/bio/bss_bio.c4
-rw-r--r--src/lib/libcrypto/bio/bss_conn.c4
-rw-r--r--src/lib/libcrypto/bio/bss_dgram.c4
-rw-r--r--src/lib/libcrypto/bio/bss_fd.c4
-rw-r--r--src/lib/libcrypto/bio/bss_file.c4
-rw-r--r--src/lib/libcrypto/bio/bss_log.c4
-rw-r--r--src/lib/libcrypto/bio/bss_mem.c4
-rw-r--r--src/lib/libcrypto/bio/bss_null.c4
-rw-r--r--src/lib/libcrypto/bio/bss_sock.c4
-rw-r--r--src/lib/libcrypto/err/err_prn.c4
-rw-r--r--src/lib/libcrypto/evp/bio_b64.c3
-rw-r--r--src/lib/libcrypto/evp/bio_enc.c3
-rw-r--r--src/lib/libcrypto/evp/bio_md.c3
23 files changed, 128 insertions, 22 deletions
diff --git a/src/lib/libcrypto/Makefile b/src/lib/libcrypto/Makefile
index ad5f4f5876..c707dcc8f3 100644
--- a/src/lib/libcrypto/Makefile
+++ b/src/lib/libcrypto/Makefile
@@ -1,4 +1,4 @@
1# $OpenBSD: Makefile,v 1.63 2021/12/25 12:21:36 jsing Exp $ 1# $OpenBSD: Makefile,v 1.64 2022/01/07 09:02:17 tb Exp $
2 2
3LIB= crypto 3LIB= crypto
4LIBREBUILD=y 4LIBREBUILD=y
@@ -29,6 +29,7 @@ CFLAGS+= -DOPENSSL_NO_HW_PADLOCK # XXX enable this?
29 29
30CFLAGS+= -I${LCRYPTO_SRC} 30CFLAGS+= -I${LCRYPTO_SRC}
31CFLAGS+= -I${LCRYPTO_SRC}/asn1 31CFLAGS+= -I${LCRYPTO_SRC}/asn1
32CFLAGS+= -I${LCRYPTO_SRC}/bio
32CFLAGS+= -I${LCRYPTO_SRC}/bn 33CFLAGS+= -I${LCRYPTO_SRC}/bn
33CFLAGS+= -I${LCRYPTO_SRC}/bytestring 34CFLAGS+= -I${LCRYPTO_SRC}/bytestring
34CFLAGS+= -I${LCRYPTO_SRC}/ec 35CFLAGS+= -I${LCRYPTO_SRC}/ec
diff --git a/src/lib/libcrypto/asn1/bio_asn1.c b/src/lib/libcrypto/asn1/bio_asn1.c
index 016e570480..6bc42009f7 100644
--- a/src/lib/libcrypto/asn1/bio_asn1.c
+++ b/src/lib/libcrypto/asn1/bio_asn1.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bio_asn1.c,v 1.15 2021/12/25 13:17:48 jsing Exp $ */ 1/* $OpenBSD: bio_asn1.c,v 1.16 2022/01/07 09:02:17 tb Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project. 3 * project.
4 */ 4 */
@@ -67,6 +67,8 @@
67#include <openssl/bio.h> 67#include <openssl/bio.h>
68#include <openssl/asn1.h> 68#include <openssl/asn1.h>
69 69
70#include "bio_local.h"
71
70/* Must be large enough for biggest tag+length */ 72/* Must be large enough for biggest tag+length */
71#define DEFAULT_ASN1_BUF_SIZE 20 73#define DEFAULT_ASN1_BUF_SIZE 20
72 74
diff --git a/src/lib/libcrypto/bio/bf_buff.c b/src/lib/libcrypto/bio/bf_buff.c
index 5b9ee35da8..42414bb51a 100644
--- a/src/lib/libcrypto/bio/bf_buff.c
+++ b/src/lib/libcrypto/bio/bf_buff.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bf_buff.c,v 1.25 2018/05/01 13:29:09 tb Exp $ */ 1/* $OpenBSD: bf_buff.c,v 1.26 2022/01/07 09:02:17 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -63,6 +63,8 @@
63#include <openssl/bio.h> 63#include <openssl/bio.h>
64#include <openssl/err.h> 64#include <openssl/err.h>
65 65
66#include "bio_local.h"
67
66static int buffer_write(BIO *h, const char *buf, int num); 68static int buffer_write(BIO *h, const char *buf, int num);
67static int buffer_read(BIO *h, char *buf, int size); 69static int buffer_read(BIO *h, char *buf, int size);
68static int buffer_puts(BIO *h, const char *str); 70static int buffer_puts(BIO *h, const char *str);
diff --git a/src/lib/libcrypto/bio/bf_nbio.c b/src/lib/libcrypto/bio/bf_nbio.c
index 05fa9161fb..c0a5ab2bcb 100644
--- a/src/lib/libcrypto/bio/bf_nbio.c
+++ b/src/lib/libcrypto/bio/bf_nbio.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bf_nbio.c,v 1.20 2018/05/01 13:29:09 tb Exp $ */ 1/* $OpenBSD: bf_nbio.c,v 1.21 2022/01/07 09:02:17 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -62,6 +62,8 @@
62 62
63#include <openssl/bio.h> 63#include <openssl/bio.h>
64 64
65#include "bio_local.h"
66
65/* BIO_put and BIO_get both add to the digest, 67/* BIO_put and BIO_get both add to the digest,
66 * BIO_gets returns the digest */ 68 * BIO_gets returns the digest */
67 69
diff --git a/src/lib/libcrypto/bio/bf_null.c b/src/lib/libcrypto/bio/bf_null.c
index 25abb8a574..1a935cf26b 100644
--- a/src/lib/libcrypto/bio/bf_null.c
+++ b/src/lib/libcrypto/bio/bf_null.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bf_null.c,v 1.12 2018/05/01 13:29:09 tb Exp $ */ 1/* $OpenBSD: bf_null.c,v 1.13 2022/01/07 09:02:17 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -61,6 +61,8 @@
61 61
62#include <openssl/bio.h> 62#include <openssl/bio.h>
63 63
64#include "bio_local.h"
65
64/* BIO_put and BIO_get both add to the digest, 66/* BIO_put and BIO_get both add to the digest,
65 * BIO_gets returns the digest */ 67 * BIO_gets returns the digest */
66 68
diff --git a/src/lib/libcrypto/bio/bio_cb.c b/src/lib/libcrypto/bio/bio_cb.c
index 52cdd24177..2ca411cd26 100644
--- a/src/lib/libcrypto/bio/bio_cb.c
+++ b/src/lib/libcrypto/bio/bio_cb.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bio_cb.c,v 1.17 2021/03/25 09:26:17 tb Exp $ */ 1/* $OpenBSD: bio_cb.c,v 1.18 2022/01/07 09:02:17 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -63,6 +63,8 @@
63#include <openssl/err.h> 63#include <openssl/err.h>
64#include <openssl/bio.h> 64#include <openssl/bio.h>
65 65
66#include "bio_local.h"
67
66long 68long
67BIO_debug_callback(BIO *bio, int cmd, const char *argp, int argi, long argl, 69BIO_debug_callback(BIO *bio, int cmd, const char *argp, int argi, long argl,
68 long ret) 70 long ret)
diff --git a/src/lib/libcrypto/bio/bio_lib.c b/src/lib/libcrypto/bio/bio_lib.c
index f129062d6e..59c1317296 100644
--- a/src/lib/libcrypto/bio/bio_lib.c
+++ b/src/lib/libcrypto/bio/bio_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bio_lib.c,v 1.33 2022/01/05 20:48:44 tb Exp $ */ 1/* $OpenBSD: bio_lib.c,v 1.34 2022/01/07 09:02:17 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -64,6 +64,8 @@
64#include <openssl/err.h> 64#include <openssl/err.h>
65#include <openssl/stack.h> 65#include <openssl/stack.h>
66 66
67#include "bio_local.h"
68
67int 69int
68BIO_get_new_index(void) 70BIO_get_new_index(void)
69{ 71{
diff --git a/src/lib/libcrypto/bio/bio_local.h b/src/lib/libcrypto/bio/bio_local.h
new file mode 100644
index 0000000000..9c2e8f4808
--- /dev/null
+++ b/src/lib/libcrypto/bio/bio_local.h
@@ -0,0 +1,66 @@
1/* $OpenBSD: bio_local.h,v 1.1 2022/01/07 09:02:17 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59#ifndef HEADER_BIO_LOCAL_H
60#define HEADER_BIO_LOCAL_H
61
62__BEGIN_HIDDEN_DECLS
63
64__END_HIDDEN_DECLS
65
66#endif /* !HEADER_BIO_LOCAL_H */
diff --git a/src/lib/libcrypto/bio/bio_meth.c b/src/lib/libcrypto/bio/bio_meth.c
index 4327c010b1..b9c07d5111 100644
--- a/src/lib/libcrypto/bio/bio_meth.c
+++ b/src/lib/libcrypto/bio/bio_meth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bio_meth.c,v 1.6 2018/06/02 04:41:12 tb Exp $ */ 1/* $OpenBSD: bio_meth.c,v 1.7 2022/01/07 09:02:17 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2018 Theo Buehler <tb@openbsd.org> 3 * Copyright (c) 2018 Theo Buehler <tb@openbsd.org>
4 * 4 *
@@ -19,6 +19,8 @@
19 19
20#include <openssl/bio.h> 20#include <openssl/bio.h>
21 21
22#include "bio_local.h"
23
22BIO_METHOD * 24BIO_METHOD *
23BIO_meth_new(int type, const char *name) 25BIO_meth_new(int type, const char *name)
24{ 26{
diff --git a/src/lib/libcrypto/bio/bss_acpt.c b/src/lib/libcrypto/bio/bss_acpt.c
index c95ddde7bb..a619bd7c5d 100644
--- a/src/lib/libcrypto/bio/bss_acpt.c
+++ b/src/lib/libcrypto/bio/bss_acpt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bss_acpt.c,v 1.29 2018/05/12 18:51:59 tb Exp $ */ 1/* $OpenBSD: bss_acpt.c,v 1.30 2022/01/07 09:02:17 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -67,6 +67,8 @@
67#include <openssl/buffer.h> 67#include <openssl/buffer.h>
68#include <openssl/err.h> 68#include <openssl/err.h>
69 69
70#include "bio_local.h"
71
70#define SOCKET_PROTOCOL IPPROTO_TCP 72#define SOCKET_PROTOCOL IPPROTO_TCP
71 73
72typedef struct bio_accept_st { 74typedef struct bio_accept_st {
diff --git a/src/lib/libcrypto/bio/bss_bio.c b/src/lib/libcrypto/bio/bss_bio.c
index 74f86a51ee..c92d35d118 100644
--- a/src/lib/libcrypto/bio/bss_bio.c
+++ b/src/lib/libcrypto/bio/bss_bio.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bss_bio.c,v 1.24 2018/05/01 13:29:09 tb Exp $ */ 1/* $OpenBSD: bss_bio.c,v 1.25 2022/01/07 09:02:17 tb Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1998-2003 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1998-2003 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -84,6 +84,8 @@
84#include <openssl/err.h> 84#include <openssl/err.h>
85#include <openssl/crypto.h> 85#include <openssl/crypto.h>
86 86
87#include "bio_local.h"
88
87static int bio_new(BIO *bio); 89static int bio_new(BIO *bio);
88static int bio_free(BIO *bio); 90static int bio_free(BIO *bio);
89static int bio_read(BIO *bio, char *buf, int size); 91static int bio_read(BIO *bio, char *buf, int size);
diff --git a/src/lib/libcrypto/bio/bss_conn.c b/src/lib/libcrypto/bio/bss_conn.c
index 46a37b0608..8ed8d2076d 100644
--- a/src/lib/libcrypto/bio/bss_conn.c
+++ b/src/lib/libcrypto/bio/bss_conn.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bss_conn.c,v 1.35 2018/05/12 18:51:59 tb Exp $ */ 1/* $OpenBSD: bss_conn.c,v 1.36 2022/01/07 09:02:17 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -70,6 +70,8 @@
70#include <openssl/buffer.h> 70#include <openssl/buffer.h>
71#include <openssl/err.h> 71#include <openssl/err.h>
72 72
73#include "bio_local.h"
74
73#define SOCKET_PROTOCOL IPPROTO_TCP 75#define SOCKET_PROTOCOL IPPROTO_TCP
74 76
75typedef struct bio_connect_st { 77typedef struct bio_connect_st {
diff --git a/src/lib/libcrypto/bio/bss_dgram.c b/src/lib/libcrypto/bio/bss_dgram.c
index 794b6d1b56..fa6e2db917 100644
--- a/src/lib/libcrypto/bio/bss_dgram.c
+++ b/src/lib/libcrypto/bio/bss_dgram.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bss_dgram.c,v 1.42 2018/05/12 17:47:53 tb Exp $ */ 1/* $OpenBSD: bss_dgram.c,v 1.43 2022/01/07 09:02:17 tb Exp $ */
2/* 2/*
3 * DTLS implementation written by Nagendra Modadugu 3 * DTLS implementation written by Nagendra Modadugu
4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. 4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -72,6 +72,8 @@
72 72
73#include <openssl/bio.h> 73#include <openssl/bio.h>
74 74
75#include "bio_local.h"
76
75#ifndef OPENSSL_NO_DGRAM 77#ifndef OPENSSL_NO_DGRAM
76 78
77 79
diff --git a/src/lib/libcrypto/bio/bss_fd.c b/src/lib/libcrypto/bio/bss_fd.c
index bbe08efc4e..7d7c427913 100644
--- a/src/lib/libcrypto/bio/bss_fd.c
+++ b/src/lib/libcrypto/bio/bss_fd.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bss_fd.c,v 1.19 2018/05/01 13:29:09 tb Exp $ */ 1/* $OpenBSD: bss_fd.c,v 1.20 2022/01/07 09:02:17 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -65,6 +65,8 @@
65 65
66#include <openssl/bio.h> 66#include <openssl/bio.h>
67 67
68#include "bio_local.h"
69
68static int fd_write(BIO *h, const char *buf, int num); 70static int fd_write(BIO *h, const char *buf, int num);
69static int fd_read(BIO *h, char *buf, int size); 71static int fd_read(BIO *h, char *buf, int size);
70static int fd_puts(BIO *h, const char *str); 72static int fd_puts(BIO *h, const char *str);
diff --git a/src/lib/libcrypto/bio/bss_file.c b/src/lib/libcrypto/bio/bss_file.c
index fe937388b2..0c9b755025 100644
--- a/src/lib/libcrypto/bio/bss_file.c
+++ b/src/lib/libcrypto/bio/bss_file.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bss_file.c,v 1.33 2018/05/30 00:23:04 tb Exp $ */ 1/* $OpenBSD: bss_file.c,v 1.34 2022/01/07 09:02:17 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -90,6 +90,8 @@
90#include <openssl/bio.h> 90#include <openssl/bio.h>
91#include <openssl/err.h> 91#include <openssl/err.h>
92 92
93#include "bio_local.h"
94
93static int file_write(BIO *h, const char *buf, int num); 95static int file_write(BIO *h, const char *buf, int num);
94static int file_read(BIO *h, char *buf, int size); 96static int file_read(BIO *h, char *buf, int size);
95static int file_puts(BIO *h, const char *str); 97static int file_puts(BIO *h, const char *str);
diff --git a/src/lib/libcrypto/bio/bss_log.c b/src/lib/libcrypto/bio/bss_log.c
index 7ef1312d79..296c87ff89 100644
--- a/src/lib/libcrypto/bio/bss_log.c
+++ b/src/lib/libcrypto/bio/bss_log.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bss_log.c,v 1.22 2018/05/01 13:29:10 tb Exp $ */ 1/* $OpenBSD: bss_log.c,v 1.23 2022/01/07 09:02:17 tb Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -70,6 +70,8 @@
70#include <openssl/buffer.h> 70#include <openssl/buffer.h>
71#include <openssl/err.h> 71#include <openssl/err.h>
72 72
73#include "bio_local.h"
74
73#ifndef NO_SYSLOG 75#ifndef NO_SYSLOG
74 76
75static int slg_write(BIO *h, const char *buf, int num); 77static int slg_write(BIO *h, const char *buf, int num);
diff --git a/src/lib/libcrypto/bio/bss_mem.c b/src/lib/libcrypto/bio/bss_mem.c
index e76e1ad2e7..3632ffed0b 100644
--- a/src/lib/libcrypto/bio/bss_mem.c
+++ b/src/lib/libcrypto/bio/bss_mem.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bss_mem.c,v 1.17 2018/05/12 18:51:59 tb Exp $ */ 1/* $OpenBSD: bss_mem.c,v 1.18 2022/01/07 09:02:17 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -64,6 +64,8 @@
64#include <openssl/err.h> 64#include <openssl/err.h>
65#include <openssl/buffer.h> 65#include <openssl/buffer.h>
66 66
67#include "bio_local.h"
68
67static int mem_write(BIO *h, const char *buf, int num); 69static int mem_write(BIO *h, const char *buf, int num);
68static int mem_read(BIO *h, char *buf, int size); 70static int mem_read(BIO *h, char *buf, int size);
69static int mem_puts(BIO *h, const char *str); 71static int mem_puts(BIO *h, const char *str);
diff --git a/src/lib/libcrypto/bio/bss_null.c b/src/lib/libcrypto/bio/bss_null.c
index c6de844da5..8a15b36b31 100644
--- a/src/lib/libcrypto/bio/bss_null.c
+++ b/src/lib/libcrypto/bio/bss_null.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bss_null.c,v 1.11 2018/05/01 13:29:10 tb Exp $ */ 1/* $OpenBSD: bss_null.c,v 1.12 2022/01/07 09:02:17 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -62,6 +62,8 @@
62 62
63#include <openssl/bio.h> 63#include <openssl/bio.h>
64 64
65#include "bio_local.h"
66
65static int null_write(BIO *h, const char *buf, int num); 67static int null_write(BIO *h, const char *buf, int num);
66static int null_read(BIO *h, char *buf, int size); 68static int null_read(BIO *h, char *buf, int size);
67static int null_puts(BIO *h, const char *str); 69static int null_puts(BIO *h, const char *str);
diff --git a/src/lib/libcrypto/bio/bss_sock.c b/src/lib/libcrypto/bio/bss_sock.c
index 9c650a8041..3b9a87fd8a 100644
--- a/src/lib/libcrypto/bio/bss_sock.c
+++ b/src/lib/libcrypto/bio/bss_sock.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bss_sock.c,v 1.24 2018/05/01 13:29:10 tb Exp $ */ 1/* $OpenBSD: bss_sock.c,v 1.25 2022/01/07 09:02:17 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -65,6 +65,8 @@
65 65
66#include <openssl/bio.h> 66#include <openssl/bio.h>
67 67
68#include "bio_local.h"
69
68static int sock_write(BIO *h, const char *buf, int num); 70static int sock_write(BIO *h, const char *buf, int num);
69static int sock_read(BIO *h, char *buf, int size); 71static int sock_read(BIO *h, char *buf, int size);
70static int sock_puts(BIO *h, const char *str); 72static int sock_puts(BIO *h, const char *str);
diff --git a/src/lib/libcrypto/err/err_prn.c b/src/lib/libcrypto/err/err_prn.c
index 48166829d4..6b5c455f06 100644
--- a/src/lib/libcrypto/err/err_prn.c
+++ b/src/lib/libcrypto/err/err_prn.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: err_prn.c,v 1.18 2017/02/07 15:52:33 jsing Exp $ */ 1/* $OpenBSD: err_prn.c,v 1.19 2022/01/07 09:02:18 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -64,6 +64,8 @@
64#include <openssl/err.h> 64#include <openssl/err.h>
65#include <openssl/lhash.h> 65#include <openssl/lhash.h>
66 66
67#include "bio_local.h"
68
67void 69void
68ERR_print_errors_cb(int (*cb)(const char *str, size_t len, void *u), void *u) 70ERR_print_errors_cb(int (*cb)(const char *str, size_t len, void *u), void *u)
69{ 71{
diff --git a/src/lib/libcrypto/evp/bio_b64.c b/src/lib/libcrypto/evp/bio_b64.c
index abe266b604..c1ec25d9c4 100644
--- a/src/lib/libcrypto/evp/bio_b64.c
+++ b/src/lib/libcrypto/evp/bio_b64.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bio_b64.c,v 1.23 2021/12/12 21:30:13 tb Exp $ */ 1/* $OpenBSD: bio_b64.c,v 1.24 2022/01/07 09:02:18 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -63,6 +63,7 @@
63#include <openssl/buffer.h> 63#include <openssl/buffer.h>
64#include <openssl/evp.h> 64#include <openssl/evp.h>
65 65
66#include "bio_local.h"
66#include "evp_locl.h" 67#include "evp_locl.h"
67 68
68static int b64_write(BIO *h, const char *buf, int num); 69static int b64_write(BIO *h, const char *buf, int num);
diff --git a/src/lib/libcrypto/evp/bio_enc.c b/src/lib/libcrypto/evp/bio_enc.c
index de9267a0d5..6ab07e13d9 100644
--- a/src/lib/libcrypto/evp/bio_enc.c
+++ b/src/lib/libcrypto/evp/bio_enc.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bio_enc.c,v 1.24 2021/12/12 21:30:13 tb Exp $ */ 1/* $OpenBSD: bio_enc.c,v 1.25 2022/01/07 09:02:18 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -63,6 +63,7 @@
63#include <openssl/buffer.h> 63#include <openssl/buffer.h>
64#include <openssl/evp.h> 64#include <openssl/evp.h>
65 65
66#include "bio_local.h"
66#include "evp_locl.h" 67#include "evp_locl.h"
67 68
68static int enc_write(BIO *h, const char *buf, int num); 69static int enc_write(BIO *h, const char *buf, int num);
diff --git a/src/lib/libcrypto/evp/bio_md.c b/src/lib/libcrypto/evp/bio_md.c
index e35510c17c..a83088a963 100644
--- a/src/lib/libcrypto/evp/bio_md.c
+++ b/src/lib/libcrypto/evp/bio_md.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bio_md.c,v 1.16 2021/12/12 21:30:13 tb Exp $ */ 1/* $OpenBSD: bio_md.c,v 1.17 2022/01/07 09:02:18 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -62,6 +62,7 @@
62#include <openssl/buffer.h> 62#include <openssl/buffer.h>
63#include <openssl/evp.h> 63#include <openssl/evp.h>
64 64
65#include "bio_local.h"
65#include "evp_locl.h" 66#include "evp_locl.h"
66 67
67/* BIO_put and BIO_get both add to the digest, 68/* BIO_put and BIO_get both add to the digest,