Remove string.h from base.h.

Including string.h in base.h causes any file that includes a BoringSSL
header to include string.h. Generally this wouldn't be a problem,
although string.h might slow down the compile if it wasn't otherwise
needed. However, it also causes problems for ipsec-tools in Android
because OpenSSL didn't have this behaviour.

This change removes string.h from base.h and, instead, adds it to each
.c file that requires it.

Change-Id: I5968e50b0e230fd3adf9b72dd2836e6f52d6fb37
Reviewed-by: David Benjamin <>
Reviewed-by: Adam Langley <>
diff --git a/crypto/asn1/tasn_new.c b/crypto/asn1/tasn_new.c
index 8a2b27d..b68eed7 100644
--- a/crypto/asn1/tasn_new.c
+++ b/crypto/asn1/tasn_new.c
@@ -56,6 +56,8 @@
 #include <openssl/asn1.h>
+#include <string.h>
 #include <openssl/asn1t.h>
 #include <openssl/err.h>
 #include <openssl/mem.h>