Remove BIO's ex_data.

No wrappers were ever added and codesearch confirms no one ever added to it
manually. Probably anyone doing complex things with BIOs just made a custom
BIO_METHOD. We can put it back with proper functions if the need ever arises.

Change-Id: Icb5da7ceeb8f1da6d08f4a8854d53dfa75827d9c
Reviewed-on: https://boringssl-review.googlesource.com/4373
Reviewed-by: Adam Langley <agl@google.com>
diff --git a/crypto/bio/bio.c b/crypto/bio/bio.c
index 9b7120b..b1e79dc 100644
--- a/crypto/bio/bio.c
+++ b/crypto/bio/bio.c
@@ -64,8 +64,6 @@
 #include <openssl/mem.h>
 #include <openssl/thread.h>
 
-#include "../internal.h"
-
 
 /* BIO_set initialises a BIO structure to have the given type and sets the
  * reference count to one. It returns one on success or zero on error. */
@@ -78,17 +76,10 @@
   bio->method = method;
   bio->shutdown = 1;
 
-  if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_BIO, bio, &bio->ex_data)) {
+  if (method->create != NULL && !method->create(bio)) {
     return 0;
   }
 
-  if (method->create != NULL) {
-    if (!method->create(bio)) {
-      CRYPTO_free_ex_data(CRYPTO_EX_INDEX_BIO, bio, &bio->ex_data);
-      return 0;
-    }
-  }
-
   return 1;
 }
 
@@ -120,8 +111,6 @@
 
     next_bio = BIO_pop(bio);
 
-    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_BIO, bio, &bio->ex_data);
-
     if (bio->method != NULL && bio->method->destroy != NULL) {
       bio->method->destroy(bio);
     }
diff --git a/crypto/internal.h b/crypto/internal.h
index 2dab634..101f7a8 100644
--- a/crypto/internal.h
+++ b/crypto/internal.h
@@ -484,7 +484,6 @@
  *
  * TODO(fork): WARNING: these are called "INDEX", but they aren't! */
 enum {
-  CRYPTO_EX_INDEX_BIO,
   CRYPTO_EX_INDEX_SSL,
   CRYPTO_EX_INDEX_SSL_CTX,
   CRYPTO_EX_INDEX_SSL_SESSION,
diff --git a/include/openssl/bio.h b/include/openssl/bio.h
index 7b5232c..2eabc52 100644
--- a/include/openssl/bio.h
+++ b/include/openssl/bio.h
@@ -789,8 +789,6 @@
    * to |next_bio|. */
   struct bio_st *next_bio; /* used by filter BIOs */
   size_t num_read, num_write;
-
-  CRYPTO_EX_DATA ex_data;
 };
 
 #define BIO_C_SET_CONNECT			100