Move some typedefs to base.h.

Change-Id: I48bcf3a989752901903d68b50665910b9372a2ff
Reviewed-on: https://boringssl-review.googlesource.com/8860
Reviewed-by: Adam Langley <agl@google.com>
Commit-Queue: Adam Langley <agl@google.com>
diff --git a/include/openssl/base.h b/include/openssl/base.h
index ac6f250..441aa29 100644
--- a/include/openssl/base.h
+++ b/include/openssl/base.h
@@ -197,7 +197,9 @@
 typedef struct asn1_string_st ASN1_VISIBLESTRING;
 
 typedef struct AUTHORITY_KEYID_st AUTHORITY_KEYID;
+typedef struct BASIC_CONSTRAINTS_st BASIC_CONSTRAINTS;
 typedef struct DIST_POINT_st DIST_POINT;
+typedef struct DSA_SIG_st DSA_SIG;
 typedef struct ISSUING_DIST_POINT_st ISSUING_DIST_POINT;
 typedef struct NAME_CONSTRAINTS_st NAME_CONSTRAINTS;
 typedef struct Netscape_certificate_sequence NETSCAPE_CERT_SEQUENCE;
@@ -211,6 +213,7 @@
 typedef struct X509_POLICY_LEVEL_st X509_POLICY_LEVEL;
 typedef struct X509_POLICY_NODE_st X509_POLICY_NODE;
 typedef struct X509_POLICY_TREE_st X509_POLICY_TREE;
+typedef struct X509_VERIFY_PARAM_st X509_VERIFY_PARAM;
 typedef struct X509_algor_st X509_ALGOR;
 typedef struct X509_crl_info_st X509_CRL_INFO;
 typedef struct X509_crl_st X509_CRL;
@@ -238,7 +241,9 @@
 typedef struct conf_value_st CONF_VALUE;
 typedef struct dh_st DH;
 typedef struct dsa_st DSA;
+typedef struct ec_group_st EC_GROUP;
 typedef struct ec_key_st EC_KEY;
+typedef struct ec_point_st EC_POINT;
 typedef struct ecdsa_method_st ECDSA_METHOD;
 typedef struct ecdsa_sig_st ECDSA_SIG;
 typedef struct engine_st ENGINE;
diff --git a/include/openssl/dsa.h b/include/openssl/dsa.h
index 2a621da..24cfcde 100644
--- a/include/openssl/dsa.h
+++ b/include/openssl/dsa.h
@@ -129,9 +129,9 @@
 /* Signatures. */
 
 /* DSA_SIG_st (aka |DSA_SIG|) contains a DSA signature as a pair of integers. */
-typedef struct DSA_SIG_st {
+struct DSA_SIG_st {
   BIGNUM *r, *s;
-} DSA_SIG;
+};
 
 /* DSA_SIG_new returns a freshly allocated, DIG_SIG structure or NULL on error.
  * Both |r| and |s| in the signature will be NULL. */
diff --git a/include/openssl/ec.h b/include/openssl/ec.h
index 32aded6..71c59d1 100644
--- a/include/openssl/ec.h
+++ b/include/openssl/ec.h
@@ -78,9 +78,6 @@
 /* Low-level operations on elliptic curves. */
 
 
-typedef struct ec_group_st EC_GROUP;
-typedef struct ec_point_st EC_POINT;
-
 /* point_conversion_form_t enumerates forms, as defined in X9.62 (ECDSA), for
  * the encoding of a elliptic curve point (x,y) */
 typedef enum {
diff --git a/include/openssl/x509_vfy.h b/include/openssl/x509_vfy.h
index 5343dbd..7ecd981 100644
--- a/include/openssl/x509_vfy.h
+++ b/include/openssl/x509_vfy.h
@@ -162,7 +162,7 @@
  * parameters used can be customized
  */
 
-typedef struct X509_VERIFY_PARAM_st
+struct X509_VERIFY_PARAM_st
 	{
 	char *name;
 	time_t check_time;	/* Time to use */
@@ -173,7 +173,7 @@
 	int depth;		/* Verify depth */
 	STACK_OF(ASN1_OBJECT) *policies;	/* Permissible policies */
 	X509_VERIFY_PARAM_ID *id;	/* opaque ID data */
-	} X509_VERIFY_PARAM;
+	};
 
 DECLARE_STACK_OF(X509_VERIFY_PARAM)
 
diff --git a/include/openssl/x509v3.h b/include/openssl/x509v3.h
index fa78f33..67063bc 100644
--- a/include/openssl/x509v3.h
+++ b/include/openssl/x509v3.h
@@ -146,10 +146,10 @@
 
 typedef BIT_STRING_BITNAME ENUMERATED_NAMES;
 
-typedef struct BASIC_CONSTRAINTS_st {
+struct BASIC_CONSTRAINTS_st {
 int ca;
 ASN1_INTEGER *pathlen;
-} BASIC_CONSTRAINTS;
+};
 
 
 typedef struct PKEY_USAGE_PERIOD_st {