diff options
author | David Benjamin <davidben@chromium.org> | 2015-04-15 23:47:17 +0300 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2015-04-16 02:35:51 +0300 |
commit | 1004b9564aa2a2f58b721e0ee46bbe9479778357 (patch) | |
tree | 275b0c1518d223d987660c0b57d2653a739e73d3 /crypto/bio | |
parent | 546f1a59ef24798defa0c94df5f0040c5be54b42 (diff) |
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>
Diffstat (limited to 'crypto/bio')
-rw-r--r-- | crypto/bio/bio.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/crypto/bio/bio.c b/crypto/bio/bio.c index 9b7120b8..b1e79dcc 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 @@ static int bio_set(BIO *bio, const BIO_METHOD *method) { 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 @@ int BIO_free(BIO *bio) { 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); } |