Skip to content

Commit 8496dec

Browse files
divVerentBoringssl LUCI CQ
authored andcommitted
Document that BIO flags should usually be left alone.
Some BIO flags can be memory safety risks when misused; others simply are not meant to be used after BIO creation. However, outright blocking is not an option, as users can define their own BIOs with their own flag semantics. Change-Id: Iad1a3dfe942155626da2163c07909f1a6a6a6964 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/91007 Commit-Queue: David Benjamin <davidben@google.com> Reviewed-by: David Benjamin <davidben@google.com> Auto-Submit: Rudolf Polzer <rpolzer@google.com>
1 parent 7623d2a commit 8496dec

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

include/openssl/bio.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,13 @@ OPENSSL_EXPORT int BIO_reset(BIO *bio);
131131
// case of BIO_pair this always returns non-zero.
132132
OPENSSL_EXPORT int BIO_eof(BIO *bio);
133133

134-
// BIO_set_flags ORs |flags| with |bio->flags|.
134+
// BIO_set_flags ORs |flags| with |bio->flags|. Unless otherwise documented,
135+
// flags are private to either BoringSSL or the custom |BIO_METHOD|.
135136
OPENSSL_EXPORT void BIO_set_flags(BIO *bio, int flags);
136137

137138
// BIO_clear_flags ANDs |bio->flags| with the bitwise-complement of |flags|.
139+
// Unless otherwise documented, flags are private to either BoringSSL or the
140+
// custom |BIO_METHOD|.
138141
OPENSSL_EXPORT void BIO_clear_flags(BIO *bio, int flags);
139142

140143
// BIO_test_flags returns |bio->flags| AND |flags|.

0 commit comments

Comments
 (0)