Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Smith <brian@briansmith.org>2015-03-28 10:12:01 +0300
committerAdam Langley <agl@google.com>2015-04-13 23:49:18 +0300
commit054e68267553e0b64975444741efa8099688d960 (patch)
tree48ad376df5dd4e09a2406784020f10626149a66a /crypto/x509
parentef24ac396ac61872c95f277732dcf8dd669f6f75 (diff)
Eliminate unnecessary includes from low-level crypto modules.
Beyond generally eliminating unnecessary includes, eliminate as many includes of headers that declare/define particularly error-prone functionality like strlen, malloc, and free. crypto/err/internal.h was added to remove the dependency on openssl/thread.h from the public openssl/err.h header. The include of <stdlib.h> in openssl/mem.h was retained since it defines OPENSSL_malloc and friends as macros around the stdlib.h functions. The public x509.h, x509v3.h, and ssl.h headers were not changed in order to minimize breakage of source compatibility with external code. Change-Id: I0d264b73ad0a720587774430b2ab8f8275960329 Reviewed-on: https://boringssl-review.googlesource.com/4220 Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'crypto/x509')
-rw-r--r--crypto/x509/by_dir.c1
-rw-r--r--crypto/x509/by_file.c5
-rw-r--r--crypto/x509/pkcs7.c1
-rw-r--r--crypto/x509/pkcs7_test.c1
-rw-r--r--crypto/x509/x509_lu.c1
-rw-r--r--crypto/x509/x509_vfy.c1
-rw-r--r--crypto/x509/x_crl.c1
-rw-r--r--crypto/x509/x_info.c1
-rw-r--r--crypto/x509/x_pkey.c3
-rw-r--r--crypto/x509/x_pubkey.c1
10 files changed, 14 insertions, 2 deletions
diff --git a/crypto/x509/by_dir.c b/crypto/x509/by_dir.c
index 3573c86f..098c1bd9 100644
--- a/crypto/x509/by_dir.c
+++ b/crypto/x509/by_dir.c
@@ -63,6 +63,7 @@
#include <openssl/err.h>
#include <openssl/lhash.h>
#include <openssl/mem.h>
+#include <openssl/thread.h>
#include <openssl/x509.h>
diff --git a/crypto/x509/by_file.c b/crypto/x509/by_file.c
index 26496318..2fdbce4a 100644
--- a/crypto/x509/by_file.c
+++ b/crypto/x509/by_file.c
@@ -55,11 +55,14 @@
* copied and put under another distribution licence
* [including the GNU Public Licence.] */
+#include <stdlib.h>
+
#include <openssl/buf.h>
#include <openssl/err.h>
#include <openssl/lhash.h>
#include <openssl/pem.h>
-#include <openssl/x509.h>
+#include <openssl/thread.h>
+
#ifndef OPENSSL_NO_STDIO
diff --git a/crypto/x509/pkcs7.c b/crypto/x509/pkcs7.c
index bb860776..99ee3daa 100644
--- a/crypto/x509/pkcs7.c
+++ b/crypto/x509/pkcs7.c
@@ -18,6 +18,7 @@
#include <openssl/bytestring.h>
#include <openssl/err.h>
+#include <openssl/mem.h>
#include <openssl/obj.h>
#include <openssl/pem.h>
#include <openssl/stack.h>
diff --git a/crypto/x509/pkcs7_test.c b/crypto/x509/pkcs7_test.c
index bac9fb28..38beb3e8 100644
--- a/crypto/x509/pkcs7_test.c
+++ b/crypto/x509/pkcs7_test.c
@@ -18,6 +18,7 @@
#include <openssl/bytestring.h>
#include <openssl/crypto.h>
+#include <openssl/mem.h>
#include <openssl/stack.h>
#include <openssl/x509.h>
diff --git a/crypto/x509/x509_lu.c b/crypto/x509/x509_lu.c
index 090d341c..cfac81d2 100644
--- a/crypto/x509/x509_lu.c
+++ b/crypto/x509/x509_lu.c
@@ -60,6 +60,7 @@
#include <openssl/err.h>
#include <openssl/lhash.h>
#include <openssl/mem.h>
+#include <openssl/thread.h>
#include <openssl/x509.h>
#include <openssl/x509v3.h>
diff --git a/crypto/x509/x509_vfy.c b/crypto/x509/x509_vfy.c
index e556fa46..dae33762 100644
--- a/crypto/x509/x509_vfy.c
+++ b/crypto/x509/x509_vfy.c
@@ -64,6 +64,7 @@
#include <openssl/lhash.h>
#include <openssl/mem.h>
#include <openssl/obj.h>
+#include <openssl/thread.h>
#include <openssl/x509.h>
#include <openssl/x509v3.h>
diff --git a/crypto/x509/x_crl.c b/crypto/x509/x_crl.c
index bb23b57e..aa92fa98 100644
--- a/crypto/x509/x_crl.c
+++ b/crypto/x509/x_crl.c
@@ -61,6 +61,7 @@
#include <openssl/mem.h>
#include <openssl/obj.h>
#include <openssl/stack.h>
+#include <openssl/thread.h>
#include <openssl/x509.h>
#include <openssl/x509v3.h>
diff --git a/crypto/x509/x_info.c b/crypto/x509/x_info.c
index 8047c719..6807b241 100644
--- a/crypto/x509/x_info.c
+++ b/crypto/x509/x_info.c
@@ -59,6 +59,7 @@
#include <openssl/asn1.h>
#include <openssl/err.h>
#include <openssl/mem.h>
+#include <openssl/thread.h>
X509_INFO *X509_INFO_new(void)
diff --git a/crypto/x509/x_pkey.c b/crypto/x509/x_pkey.c
index 550078be..5acbe5b4 100644
--- a/crypto/x509/x_pkey.c
+++ b/crypto/x509/x_pkey.c
@@ -59,8 +59,9 @@
#include <string.h>
#include <openssl/asn1.h>
-#include <openssl/mem.h>
#include <openssl/err.h>
+#include <openssl/mem.h>
+#include <openssl/thread.h>
X509_PKEY *X509_PKEY_new(void)
diff --git a/crypto/x509/x_pubkey.c b/crypto/x509/x_pubkey.c
index c285aa67..4b96ed75 100644
--- a/crypto/x509/x_pubkey.c
+++ b/crypto/x509/x_pubkey.c
@@ -60,6 +60,7 @@
#include <openssl/evp.h>
#include <openssl/mem.h>
#include <openssl/obj.h>
+#include <openssl/thread.h>
#include <openssl/x509.h>
#include "../evp/internal.h"