Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Langley <agl@chromium.org>2014-08-13 03:18:08 +0400
committerAdam Langley <agl@google.com>2014-08-14 20:37:05 +0400
commite2c4d262141f9a7de9baf6d0d7151682e9947357 (patch)
tree9804f83b0c15fdb95f310777cd1417ef0afd4b67 /crypto/bio
parent1b96526c6f3a3ba492fd0c7d75ddd4e2414a690c (diff)
Recover BIO_number_{read|written}.
Android needs it. These functions were removed in the move to BoringSSL. Change-Id: Ice24a0a1c390930cf07dbd00f72a3e12e6c241f9 Reviewed-on: https://boringssl-review.googlesource.com/1510 Reviewed-by: David Benjamin <davidben@chromium.org> Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'crypto/bio')
-rw-r--r--crypto/bio/bio.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/crypto/bio/bio.c b/crypto/bio/bio.c
index 11e4f65f..a35ff651 100644
--- a/crypto/bio/bio.c
+++ b/crypto/bio/bio.c
@@ -144,7 +144,7 @@ void BIO_free_all(BIO *bio) {
}
static int bio_io(BIO *bio, void *buf, int len, size_t method_offset,
- int callback_flags, unsigned long *num) {
+ int callback_flags, size_t *num) {
int i;
typedef int (*io_func_t)(BIO *, char *, int);
io_func_t io_func = NULL;
@@ -371,6 +371,14 @@ char *BIO_get_callback_arg(const BIO *bio) {
return bio->cb_arg;
}
+OPENSSL_EXPORT size_t BIO_number_read(const BIO *bio) {
+ return bio->num_read;
+}
+
+OPENSSL_EXPORT size_t BIO_number_written(const BIO *bio) {
+ return bio->num_write;
+}
+
BIO *BIO_push(BIO *bio, BIO *appended_bio) {
BIO *last_bio;