summaryrefslogtreecommitdiffstats
path: root/src/crypto/bio/bio.c
diff options
context:
space:
mode:
authorAdam Langley <agl@google.com>2015-05-11 17:20:37 -0700
committerKenny Root <kroot@google.com>2015-05-12 23:06:14 +0000
commite9ada863a7b3e81f5d2b1e3bdd2305da902a87f5 (patch)
tree6e43e34595ecf887c26c32b86d8ab097fe8cac64 /src/crypto/bio/bio.c
parentb3106a0cc1493bbe0505c0ec0ce3da4ca90a29ae (diff)
downloadexternal_boringssl-e9ada863a7b3e81f5d2b1e3bdd2305da902a87f5.zip
external_boringssl-e9ada863a7b3e81f5d2b1e3bdd2305da902a87f5.tar.gz
external_boringssl-e9ada863a7b3e81f5d2b1e3bdd2305da902a87f5.tar.bz2
external/boringssl: bump revision.
This change bumps the BoringSSL revision to the current tip-of-tree. Change-Id: I91d5bf467e16e8d86cb19a4de873985f524e5faa
Diffstat (limited to 'src/crypto/bio/bio.c')
-rw-r--r--src/crypto/bio/bio.c28
1 files changed, 6 insertions, 22 deletions
diff --git a/src/crypto/bio/bio.c b/src/crypto/bio/bio.c
index 4d947a6..48c1466 100644
--- a/src/crypto/bio/bio.c
+++ b/src/crypto/bio/bio.c
@@ -58,7 +58,6 @@
#include <errno.h>
#include <limits.h>
-#include <stddef.h>
#include <string.h>
#include <openssl/err.h>
@@ -78,17 +77,10 @@ static int bio_set(BIO *bio, const BIO_METHOD *method) {
bio->shutdown = 1;
bio->references = 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;
}
@@ -125,8 +117,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);
}
@@ -136,6 +126,11 @@ int BIO_free(BIO *bio) {
return 1;
}
+BIO *BIO_up_ref(BIO *bio) {
+ CRYPTO_add(&bio->references, 1, CRYPTO_LOCK_BIO);
+ return bio;
+}
+
void BIO_vfree(BIO *bio) {
BIO_free(bio);
}
@@ -397,10 +392,6 @@ BIO *BIO_push(BIO *bio, BIO *appended_bio) {
}
last_bio->next_bio = appended_bio;
- /* TODO(fork): this seems very suspect. If we got rid of BIO SSL, we could
- * get rid of this. */
- BIO_ctrl(bio, BIO_CTRL_PUSH, 0, bio);
-
return bio;
}
@@ -411,7 +402,6 @@ BIO *BIO_pop(BIO *bio) {
return NULL;
}
ret = bio->next_bio;
- BIO_ctrl(bio, BIO_CTRL_POP, 0, bio);
bio->next_bio = NULL;
return ret;
}
@@ -462,12 +452,6 @@ int BIO_indent(BIO *bio, unsigned indent, unsigned max_indent) {
return 1;
}
-void BIO_print_errors_fp(FILE *out) {
- BIO *bio = BIO_new_fp(out, BIO_NOCLOSE);
- BIO_print_errors(bio);
- BIO_free(bio);
-}
-
static int print_bio(const char *str, size_t len, void *bio) {
return BIO_write((BIO *)bio, str, len);
}