From 74e2c009c83ad374bd6acdcfc376a384e25ab007 Mon Sep 17 00:00:00 2001 From: jsing <> Date: Fri, 11 Jul 2014 08:44:49 +0000 Subject: Only import cryptlib.h in the four source files that actually need it. Remove the openssl public includes from cryptlib.h and add a small number of includes into the source files that actually need them. While here, also sort/group/tidy the includes. ok beck@ miod@ --- src/lib/libcrypto/bio/b_dump.c | 4 +--- src/lib/libcrypto/bio/b_sock.c | 6 +++--- src/lib/libcrypto/bio/bf_buff.c | 4 ++-- src/lib/libcrypto/bio/bf_lbuf.c | 6 +++--- src/lib/libcrypto/bio/bf_nbio.c | 8 ++++---- src/lib/libcrypto/bio/bf_null.c | 6 +++--- src/lib/libcrypto/bio/bio_cb.c | 8 ++++---- src/lib/libcrypto/bio/bio_lib.c | 9 +++++---- src/lib/libcrypto/bio/bss_acpt.c | 5 +++-- src/lib/libcrypto/bio/bss_conn.c | 5 +++-- src/lib/libcrypto/bio/bss_dgram.c | 3 +-- src/lib/libcrypto/bio/bss_fd.c | 4 +--- src/lib/libcrypto/bio/bss_file.c | 3 +-- src/lib/libcrypto/bio/bss_log.c | 4 +--- src/lib/libcrypto/bio/bss_mem.c | 5 +++-- src/lib/libcrypto/bio/bss_null.c | 3 +-- src/lib/libcrypto/bio/bss_sock.c | 4 +--- 17 files changed, 40 insertions(+), 47 deletions(-) (limited to 'src/lib/libcrypto/bio') diff --git a/src/lib/libcrypto/bio/b_dump.c b/src/lib/libcrypto/bio/b_dump.c index 62a6c269ac..91979bd755 100644 --- a/src/lib/libcrypto/bio/b_dump.c +++ b/src/lib/libcrypto/bio/b_dump.c @@ -1,4 +1,4 @@ -/* $OpenBSD: b_dump.c,v 1.18 2014/07/10 13:58:22 jsing Exp $ */ +/* $OpenBSD: b_dump.c,v 1.19 2014/07/11 08:44:47 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -65,8 +65,6 @@ #include -#include "cryptlib.h" - #define TRUNCATE #define DUMP_WIDTH 16 #define DUMP_WIDTH_LESS_INDENT(i) (DUMP_WIDTH - ((i - (i > 6 ? 6 : i) + 3) / 4)) diff --git a/src/lib/libcrypto/bio/b_sock.c b/src/lib/libcrypto/bio/b_sock.c index bbae2a31b9..8c37a3e175 100644 --- a/src/lib/libcrypto/bio/b_sock.c +++ b/src/lib/libcrypto/bio/b_sock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: b_sock.c,v 1.53 2014/07/10 21:57:40 miod Exp $ */ +/* $OpenBSD: b_sock.c,v 1.54 2014/07/11 08:44:47 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -72,8 +72,8 @@ #include #include - -#include "cryptlib.h" +#include +#include int BIO_get_host_ip(const char *str, unsigned char *ip) diff --git a/src/lib/libcrypto/bio/bf_buff.c b/src/lib/libcrypto/bio/bf_buff.c index ea55e490be..ab47ae4627 100644 --- a/src/lib/libcrypto/bio/bf_buff.c +++ b/src/lib/libcrypto/bio/bf_buff.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bf_buff.c,v 1.20 2014/07/10 13:58:22 jsing Exp $ */ +/* $OpenBSD: bf_buff.c,v 1.21 2014/07/11 08:44:47 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -60,8 +60,8 @@ #include #include -#include "cryptlib.h" #include +#include static int buffer_write(BIO *h, const char *buf, int num); static int buffer_read(BIO *h, char *buf, int size); diff --git a/src/lib/libcrypto/bio/bf_lbuf.c b/src/lib/libcrypto/bio/bf_lbuf.c index 8c2b6e6d4d..e90b7f239f 100644 --- a/src/lib/libcrypto/bio/bf_lbuf.c +++ b/src/lib/libcrypto/bio/bf_lbuf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bf_lbuf.c,v 1.11 2014/06/12 15:49:28 deraadt Exp $ */ +/* $OpenBSD: bf_lbuf.c,v 1.12 2014/07/11 08:44:47 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -56,9 +56,9 @@ * [including the GNU Public Licence.] */ -#include #include -#include "cryptlib.h" +#include + #include #include diff --git a/src/lib/libcrypto/bio/bf_nbio.c b/src/lib/libcrypto/bio/bf_nbio.c index e2480e7489..86a13a8bc8 100644 --- a/src/lib/libcrypto/bio/bf_nbio.c +++ b/src/lib/libcrypto/bio/bf_nbio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bf_nbio.c,v 1.16 2014/06/12 15:49:28 deraadt Exp $ */ +/* $OpenBSD: bf_nbio.c,v 1.17 2014/07/11 08:44:47 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -56,11 +56,11 @@ * [including the GNU Public Licence.] */ -#include #include -#include "cryptlib.h" -#include +#include + #include +#include /* BIO_put and BIO_get both add to the digest, * BIO_gets returns the digest */ diff --git a/src/lib/libcrypto/bio/bf_null.c b/src/lib/libcrypto/bio/bf_null.c index 1ef2fbe0f9..09d54b6b21 100644 --- a/src/lib/libcrypto/bio/bf_null.c +++ b/src/lib/libcrypto/bio/bf_null.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bf_null.c,v 1.10 2014/06/12 15:49:28 deraadt Exp $ */ +/* $OpenBSD: bf_null.c,v 1.11 2014/07/11 08:44:47 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -56,9 +56,9 @@ * [including the GNU Public Licence.] */ -#include #include -#include "cryptlib.h" +#include + #include /* BIO_put and BIO_get both add to the digest, diff --git a/src/lib/libcrypto/bio/bio_cb.c b/src/lib/libcrypto/bio/bio_cb.c index 5701b53d05..7d1f025452 100644 --- a/src/lib/libcrypto/bio/bio_cb.c +++ b/src/lib/libcrypto/bio/bio_cb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bio_cb.c,v 1.14 2014/06/12 15:49:28 deraadt Exp $ */ +/* $OpenBSD: bio_cb.c,v 1.15 2014/07/11 08:44:47 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -57,11 +57,11 @@ */ #include -#include #include -#include "cryptlib.h" -#include +#include + #include +#include long BIO_debug_callback(BIO *bio, int cmd, const char *argp, int argi, long argl, diff --git a/src/lib/libcrypto/bio/bio_lib.c b/src/lib/libcrypto/bio/bio_lib.c index 876a357bef..41b3d31678 100644 --- a/src/lib/libcrypto/bio/bio_lib.c +++ b/src/lib/libcrypto/bio/bio_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bio_lib.c,v 1.18 2014/06/12 15:49:28 deraadt Exp $ */ +/* $OpenBSD: bio_lib.c,v 1.19 2014/07/11 08:44:47 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -56,11 +56,12 @@ * [including the GNU Public Licence.] */ -#include #include -#include -#include "cryptlib.h" +#include + #include +#include +#include #include BIO * diff --git a/src/lib/libcrypto/bio/bss_acpt.c b/src/lib/libcrypto/bio/bss_acpt.c index 580c52da6c..c0316a2999 100644 --- a/src/lib/libcrypto/bio/bss_acpt.c +++ b/src/lib/libcrypto/bio/bss_acpt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bss_acpt.c,v 1.22 2014/07/10 13:58:22 jsing Exp $ */ +/* $OpenBSD: bss_acpt.c,v 1.23 2014/07/11 08:44:47 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -63,8 +63,9 @@ #include #include -#include "cryptlib.h" #include +#include +#include #define SOCKET_PROTOCOL IPPROTO_TCP diff --git a/src/lib/libcrypto/bio/bss_conn.c b/src/lib/libcrypto/bio/bss_conn.c index d5763a0ce3..8049f5c3f0 100644 --- a/src/lib/libcrypto/bio/bss_conn.c +++ b/src/lib/libcrypto/bio/bss_conn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bss_conn.c,v 1.28 2014/07/10 13:58:22 jsing Exp $ */ +/* $OpenBSD: bss_conn.c,v 1.29 2014/07/11 08:44:47 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -66,8 +66,9 @@ #include #include -#include "cryptlib.h" #include +#include +#include #define SOCKET_PROTOCOL IPPROTO_TCP diff --git a/src/lib/libcrypto/bio/bss_dgram.c b/src/lib/libcrypto/bio/bss_dgram.c index d56b71ba27..caa8480657 100644 --- a/src/lib/libcrypto/bio/bss_dgram.c +++ b/src/lib/libcrypto/bio/bss_dgram.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bss_dgram.c,v 1.30 2014/07/10 22:45:56 jsing Exp $ */ +/* $OpenBSD: bss_dgram.c,v 1.31 2014/07/11 08:44:47 jsing Exp $ */ /* * DTLS implementation written by Nagendra Modadugu * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. @@ -69,7 +69,6 @@ #include -#include "cryptlib.h" #include #ifndef OPENSSL_NO_DGRAM diff --git a/src/lib/libcrypto/bio/bss_fd.c b/src/lib/libcrypto/bio/bss_fd.c index 6e8e8d0815..71abb4744a 100644 --- a/src/lib/libcrypto/bio/bss_fd.c +++ b/src/lib/libcrypto/bio/bss_fd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bss_fd.c,v 1.16 2014/07/10 22:45:56 jsing Exp $ */ +/* $OpenBSD: bss_fd.c,v 1.17 2014/07/11 08:44:47 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -63,8 +63,6 @@ #include -#include "cryptlib.h" - #if defined(OPENSSL_NO_POSIX_IO) /* * One can argue that one should implement dummy placeholder for diff --git a/src/lib/libcrypto/bio/bss_file.c b/src/lib/libcrypto/bio/bss_file.c index 44345f3c70..4fa3fb6062 100644 --- a/src/lib/libcrypto/bio/bss_file.c +++ b/src/lib/libcrypto/bio/bss_file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bss_file.c,v 1.29 2014/07/10 13:58:22 jsing Exp $ */ +/* $OpenBSD: bss_file.c,v 1.30 2014/07/11 08:44:47 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -87,7 +87,6 @@ #include #include -#include "cryptlib.h" #include #include diff --git a/src/lib/libcrypto/bio/bss_log.c b/src/lib/libcrypto/bio/bss_log.c index 63361ce22f..fcaa985aa0 100644 --- a/src/lib/libcrypto/bio/bss_log.c +++ b/src/lib/libcrypto/bio/bss_log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bss_log.c,v 1.20 2014/07/10 13:58:22 jsing Exp $ */ +/* $OpenBSD: bss_log.c,v 1.21 2014/07/11 08:44:47 jsing Exp $ */ /* ==================================================================== * Copyright (c) 1999 The OpenSSL Project. All rights reserved. * @@ -67,8 +67,6 @@ #include #include -#include "cryptlib.h" - #include #include diff --git a/src/lib/libcrypto/bio/bss_mem.c b/src/lib/libcrypto/bio/bss_mem.c index 849a2d05ce..8310f8cf4d 100644 --- a/src/lib/libcrypto/bio/bss_mem.c +++ b/src/lib/libcrypto/bio/bss_mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bss_mem.c,v 1.12 2014/07/10 13:58:22 jsing Exp $ */ +/* $OpenBSD: bss_mem.c,v 1.13 2014/07/11 08:44:47 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -60,8 +60,9 @@ #include #include -#include "cryptlib.h" #include +#include +#include static int mem_write(BIO *h, const char *buf, int num); static int mem_read(BIO *h, char *buf, int size); diff --git a/src/lib/libcrypto/bio/bss_null.c b/src/lib/libcrypto/bio/bss_null.c index 226076e13a..42ee626b13 100644 --- a/src/lib/libcrypto/bio/bss_null.c +++ b/src/lib/libcrypto/bio/bss_null.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bss_null.c,v 1.9 2014/07/10 13:58:22 jsing Exp $ */ +/* $OpenBSD: bss_null.c,v 1.10 2014/07/11 08:44:47 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -60,7 +60,6 @@ #include #include -#include "cryptlib.h" #include static int null_write(BIO *h, const char *buf, int num); diff --git a/src/lib/libcrypto/bio/bss_sock.c b/src/lib/libcrypto/bio/bss_sock.c index ced988f97a..dd470eb65e 100644 --- a/src/lib/libcrypto/bio/bss_sock.c +++ b/src/lib/libcrypto/bio/bss_sock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bss_sock.c,v 1.22 2014/07/10 13:58:22 jsing Exp $ */ +/* $OpenBSD: bss_sock.c,v 1.23 2014/07/11 08:44:47 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -63,8 +63,6 @@ #include #include -#include "cryptlib.h" - #include static int sock_write(BIO *h, const char *buf, int num); -- cgit v1.2.3-55-g6feb