summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bio
diff options
context:
space:
mode:
authorjsing <>2014-07-10 13:58:23 +0000
committerjsing <>2014-07-10 13:58:23 +0000
commitf8e6fe02fc43958d79cf9326eebabf8ef8d3ae34 (patch)
tree520bd0eaa8855b175013ab92f4175f47f1099115 /src/lib/libcrypto/bio
parenta2a7393cf3489febec569cfa8aab8735e4f58339 (diff)
downloadopenbsd-f8e6fe02fc43958d79cf9326eebabf8ef8d3ae34.tar.gz
openbsd-f8e6fe02fc43958d79cf9326eebabf8ef8d3ae34.tar.bz2
openbsd-f8e6fe02fc43958d79cf9326eebabf8ef8d3ae34.zip
Stop including standard headers via cryptlib.h - pull in the headers that
are needed in the source files that actually require them. ok beck@ miod@
Diffstat (limited to 'src/lib/libcrypto/bio')
-rw-r--r--src/lib/libcrypto/bio/b_dump.c3
-rw-r--r--src/lib/libcrypto/bio/b_sock.c3
-rw-r--r--src/lib/libcrypto/bio/bf_buff.c6
-rw-r--r--src/lib/libcrypto/bio/bss_acpt.c10
-rw-r--r--src/lib/libcrypto/bio/bss_conn.c15
-rw-r--r--src/lib/libcrypto/bio/bss_dgram.c13
-rw-r--r--src/lib/libcrypto/bio/bss_fd.c6
-rw-r--r--src/lib/libcrypto/bio/bss_file.c7
-rw-r--r--src/lib/libcrypto/bio/bss_log.c11
-rw-r--r--src/lib/libcrypto/bio/bss_mem.c6
-rw-r--r--src/lib/libcrypto/bio/bss_null.c6
-rw-r--r--src/lib/libcrypto/bio/bss_sock.c10
12 files changed, 57 insertions, 39 deletions
diff --git a/src/lib/libcrypto/bio/b_dump.c b/src/lib/libcrypto/bio/b_dump.c
index c379944804..62a6c269ac 100644
--- a/src/lib/libcrypto/bio/b_dump.c
+++ b/src/lib/libcrypto/bio/b_dump.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: b_dump.c,v 1.17 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: b_dump.c,v 1.18 2014/07/10 13:58:22 jsing 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,7 @@
61 */ 61 */
62 62
63#include <stdio.h> 63#include <stdio.h>
64#include <string.h>
64 65
65#include <openssl/bio.h> 66#include <openssl/bio.h>
66 67
diff --git a/src/lib/libcrypto/bio/b_sock.c b/src/lib/libcrypto/bio/b_sock.c
index be8b555217..32ac3b0664 100644
--- a/src/lib/libcrypto/bio/b_sock.c
+++ b/src/lib/libcrypto/bio/b_sock.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: b_sock.c,v 1.51 2014/07/10 09:33:45 bcook Exp $ */ 1/* $OpenBSD: b_sock.c,v 1.52 2014/07/10 13:58:22 jsing 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 *
@@ -58,6 +58,7 @@
58 58
59#include <sys/ioctl.h> 59#include <sys/ioctl.h>
60#include <sys/socket.h> 60#include <sys/socket.h>
61#include <string.h>
61 62
62#include <arpa/inet.h> 63#include <arpa/inet.h>
63#include <netinet/in.h> 64#include <netinet/in.h>
diff --git a/src/lib/libcrypto/bio/bf_buff.c b/src/lib/libcrypto/bio/bf_buff.c
index 4aa5d39293..ea55e490be 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.19 2014/07/10 11:25:13 tedu Exp $ */ 1/* $OpenBSD: bf_buff.c,v 1.20 2014/07/10 13:58:22 jsing 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 *
@@ -56,8 +56,10 @@
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59#include <stdio.h>
60#include <errno.h> 59#include <errno.h>
60#include <stdio.h>
61#include <string.h>
62
61#include "cryptlib.h" 63#include "cryptlib.h"
62#include <openssl/bio.h> 64#include <openssl/bio.h>
63 65
diff --git a/src/lib/libcrypto/bio/bss_acpt.c b/src/lib/libcrypto/bio/bss_acpt.c
index 2011aefc54..580c52da6c 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.21 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: bss_acpt.c,v 1.22 2014/07/10 13:58:22 jsing 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 *
@@ -56,13 +56,15 @@
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59#include <stdio.h> 59#include <sys/socket.h>
60
60#include <errno.h> 61#include <errno.h>
62#include <stdio.h>
63#include <string.h>
61#include <unistd.h> 64#include <unistd.h>
65
62#include "cryptlib.h" 66#include "cryptlib.h"
63#include <openssl/bio.h> 67#include <openssl/bio.h>
64#include <sys/socket.h>
65
66 68
67#define SOCKET_PROTOCOL IPPROTO_TCP 69#define SOCKET_PROTOCOL IPPROTO_TCP
68 70
diff --git a/src/lib/libcrypto/bio/bss_conn.c b/src/lib/libcrypto/bio/bss_conn.c
index 0d29e428c9..d5763a0ce3 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.27 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: bss_conn.c,v 1.28 2014/07/10 13:58:22 jsing 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 *
@@ -56,15 +56,18 @@
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59#include <stdio.h> 59#include <sys/socket.h>
60
61#include <netinet/in.h>
62
60#include <errno.h> 63#include <errno.h>
64#include <netdb.h>
65#include <stdio.h>
66#include <string.h>
61#include <unistd.h> 67#include <unistd.h>
68
62#include "cryptlib.h" 69#include "cryptlib.h"
63#include <openssl/bio.h> 70#include <openssl/bio.h>
64#include <netdb.h>
65#include <sys/socket.h>
66#include <netinet/in.h>
67
68 71
69#define SOCKET_PROTOCOL IPPROTO_TCP 72#define SOCKET_PROTOCOL IPPROTO_TCP
70 73
diff --git a/src/lib/libcrypto/bio/bss_dgram.c b/src/lib/libcrypto/bio/bss_dgram.c
index 0e0698d2ab..d06406aebd 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.28 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: bss_dgram.c,v 1.29 2014/07/10 13:58:22 jsing 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.
@@ -57,15 +57,18 @@
57 * 57 *
58 */ 58 */
59 59
60#include <sys/socket.h>
61
62#include <netinet/in.h>
60 63
61#include <stdio.h>
62#include <errno.h> 64#include <errno.h>
65#include <netdb.h>
66#include <stdio.h>
67#include <string.h>
63#include <unistd.h> 68#include <unistd.h>
69
64#include "cryptlib.h" 70#include "cryptlib.h"
65#include <openssl/bio.h> 71#include <openssl/bio.h>
66#include <netdb.h>
67#include <sys/socket.h>
68#include <netinet/in.h>
69 72
70#ifndef OPENSSL_NO_DGRAM 73#ifndef OPENSSL_NO_DGRAM
71 74
diff --git a/src/lib/libcrypto/bio/bss_fd.c b/src/lib/libcrypto/bio/bss_fd.c
index ea4f59e1bd..60efde91c9 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.14 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: bss_fd.c,v 1.15 2014/07/10 13:58:22 jsing 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 *
@@ -56,9 +56,11 @@
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59#include <stdio.h>
60#include <errno.h> 59#include <errno.h>
60#include <stdio.h>
61#include <string.h>
61#include <unistd.h> 62#include <unistd.h>
63
62#include "cryptlib.h" 64#include "cryptlib.h"
63 65
64#if defined(OPENSSL_NO_POSIX_IO) 66#if defined(OPENSSL_NO_POSIX_IO)
diff --git a/src/lib/libcrypto/bio/bss_file.c b/src/lib/libcrypto/bio/bss_file.c
index 70a85220e4..44345f3c70 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.28 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: bss_file.c,v 1.29 2014/07/10 13:58:22 jsing 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 *
@@ -83,13 +83,14 @@
83#endif 83#endif
84#endif 84#endif
85 85
86#include <stdio.h>
87#include <errno.h> 86#include <errno.h>
87#include <stdio.h>
88#include <string.h>
89
88#include "cryptlib.h" 90#include "cryptlib.h"
89#include <openssl/bio.h> 91#include <openssl/bio.h>
90#include <openssl/err.h> 92#include <openssl/err.h>
91 93
92
93static int file_write(BIO *h, const char *buf, int num); 94static int file_write(BIO *h, const char *buf, int num);
94static int file_read(BIO *h, char *buf, int size); 95static int file_read(BIO *h, char *buf, int size);
95static int file_puts(BIO *h, const char *str); 96static 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 0124f1403b..63361ce22f 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.19 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: bss_log.c,v 1.20 2014/07/10 13:58:22 jsing 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 *
@@ -62,20 +62,18 @@
62 62
63*/ 63*/
64 64
65
66#include <stdio.h>
67#include <errno.h> 65#include <errno.h>
66#include <stdio.h>
67#include <string.h>
68#include <syslog.h>
68 69
69#include "cryptlib.h" 70#include "cryptlib.h"
70 71
71#include <syslog.h>
72
73#include <openssl/buffer.h> 72#include <openssl/buffer.h>
74#include <openssl/err.h> 73#include <openssl/err.h>
75 74
76#ifndef NO_SYSLOG 75#ifndef NO_SYSLOG
77 76
78
79static int slg_write(BIO *h, const char *buf, int num); 77static int slg_write(BIO *h, const char *buf, int num);
80static int slg_puts(BIO *h, const char *str); 78static int slg_puts(BIO *h, const char *str);
81static long slg_ctrl(BIO *h, int cmd, long arg1, void *arg2); 79static long slg_ctrl(BIO *h, int cmd, long arg1, void *arg2);
@@ -214,5 +212,4 @@ xcloselog(BIO* bp)
214 closelog(); 212 closelog();
215} 213}
216 214
217
218#endif /* NO_SYSLOG */ 215#endif /* NO_SYSLOG */
diff --git a/src/lib/libcrypto/bio/bss_mem.c b/src/lib/libcrypto/bio/bss_mem.c
index 9b40a6d4dc..849a2d05ce 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.11 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: bss_mem.c,v 1.12 2014/07/10 13:58:22 jsing 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 *
@@ -56,8 +56,10 @@
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59#include <stdio.h>
60#include <errno.h> 59#include <errno.h>
60#include <stdio.h>
61#include <string.h>
62
61#include "cryptlib.h" 63#include "cryptlib.h"
62#include <openssl/bio.h> 64#include <openssl/bio.h>
63 65
diff --git a/src/lib/libcrypto/bio/bss_null.c b/src/lib/libcrypto/bio/bss_null.c
index 36a47a2145..226076e13a 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.8 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: bss_null.c,v 1.9 2014/07/10 13:58:22 jsing 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 *
@@ -56,8 +56,10 @@
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59#include <stdio.h>
60#include <errno.h> 59#include <errno.h>
60#include <stdio.h>
61#include <string.h>
62
61#include "cryptlib.h" 63#include "cryptlib.h"
62#include <openssl/bio.h> 64#include <openssl/bio.h>
63 65
diff --git a/src/lib/libcrypto/bio/bss_sock.c b/src/lib/libcrypto/bio/bss_sock.c
index 238f5dc2de..ced988f97a 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.21 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: bss_sock.c,v 1.22 2014/07/10 13:58:22 jsing 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 *
@@ -56,12 +56,14 @@
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59#include <stdio.h> 59#include <sys/socket.h>
60
60#include <errno.h> 61#include <errno.h>
62#include <stdio.h>
63#include <string.h>
61#include <unistd.h> 64#include <unistd.h>
62#include "cryptlib.h"
63#include <sys/socket.h>
64 65
66#include "cryptlib.h"
65 67
66#include <openssl/bio.h> 68#include <openssl/bio.h>
67 69