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
path: root/crypto
diff options
context:
space:
mode:
authorAlessandro Ghedini <alessandro@ghedini.me>2016-09-11 03:49:12 +0300
committerCQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>2016-09-14 02:52:14 +0300
commit32d961ae48b0b1289feb640cecc199e64bf64f25 (patch)
treebbc43d2c1c41d1b4e7db8805ea1b8ffcc3e4f144 /crypto
parenta97919791b9cb2bb87692e02b4c4d768f4834a00 (diff)
Implement BIO_eof() for compatibility
This function (actually a macro in OpenSSL) is used by several projects (e.g. OpenResty, OpenVPN, ...) so it can useuful to provide it for compatibility. However, depending on the semantics of the BIO type (e.g. BIO_pair), the return value can be meaningless, which might explain why it was removed. Change-Id: I0e432c92222c267eb994d32b0bc28e999c4b40a7 Reviewed-on: https://boringssl-review.googlesource.com/11020 CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org> Reviewed-by: Adam Langley <agl@google.com> Commit-Queue: Adam Langley <agl@google.com>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/bio/bio.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/bio/bio.c b/crypto/bio/bio.c
index 4b5bb720..8f8a1969 100644
--- a/crypto/bio/bio.c
+++ b/crypto/bio/bio.c
@@ -243,6 +243,10 @@ int BIO_reset(BIO *bio) {
return BIO_ctrl(bio, BIO_CTRL_RESET, 0, NULL);
}
+int BIO_eof(BIO *bio) {
+ return BIO_ctrl(bio, BIO_CTRL_EOF, 0, NULL);
+}
+
void BIO_set_flags(BIO *bio, int flags) {
bio->flags |= flags;
}