aboutsummaryrefslogtreecommitdiff
path: root/crypto/bio
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@google.com>2021-12-13 15:34:38 -0500
committerBoringssl LUCI CQ <boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com>2021-12-15 19:34:03 +0000
commite21f272a664ab5785606d2caf5c78737458303e5 (patch)
treea26d491d7261a6dbb6dc1acecc513ea83b2c7eb3 /crypto/bio
parent9631bc10418143610e7747b138ed57cd97bc3c5d (diff)
downloadboringssl-e21f272a664ab5785606d2caf5c78737458303e5.zip
boringssl-e21f272a664ab5785606d2caf5c78737458303e5.tar.gz
boringssl-e21f272a664ab5785606d2caf5c78737458303e5.tar.bz2
Add BIO_tell and BIO_seek wrappers.
Change-Id: Ia5db220d13cf42fac6958a2c7416743ca2991479 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/50745 Reviewed-by: Adam Langley <agl@google.com> Commit-Queue: David Benjamin <davidben@google.com>
Diffstat (limited to 'crypto/bio')
-rw-r--r--crypto/bio/file.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/crypto/bio/file.c b/crypto/bio/file.c
index 835d661..66278e5 100644
--- a/crypto/bio/file.c
+++ b/crypto/bio/file.c
@@ -308,4 +308,10 @@ int BIO_rw_filename(BIO *bio, const char *filename) {
BIO_CLOSE | BIO_FP_READ | BIO_FP_WRITE, (char *)filename);
}
+long BIO_tell(BIO *bio) { return BIO_ctrl(bio, BIO_C_FILE_TELL, 0, NULL); }
+
+long BIO_seek(BIO *bio, long offset) {
+ return BIO_ctrl(bio, BIO_C_FILE_SEEK, offset, NULL);
+}
+
#endif // OPENSSL_TRUSTY