3c1ccc017c
Unfortunately, these are also some of the worst APIs in the SSL stack. I've tried to capture all the things they expose to the caller. 0 vs -1 is intentionally left unexpanded on for now. Upstream's documentation says 0 means transport EOF, which is a nice idea but isn't true. (A lot of random functions return 0 on error and pass it up to the caller.) https://crbug.com/466303 tracks fixing that. SSL_set_bio is intentionally documented to NOT be usable when they're already configured. The function tries to behave in this case and even with additional cases when |rbio| and/or |wbio| are unchanged, but this is buggy. For instance, this will explode: SSL_set_bio(ssl, bio1, bio1); SSL_set_bio(ssl, bio2, SSL_get_wbio(ssl)); As will this, though it's less clear this is part of the API contract due to SSL taking ownership. SSL_set_bio(ssl, bio1, bio2); SSL_set_bio(ssl, bio2, bio1); It also tries to handle ssl->bbio already existing, but I doubt it quite works. Hopefully we can drop ssl->bbio eventually. (Why is this so complicated...) Change-Id: I5f9f3043915bffc67e2ebd282813e04afbe076e6 Reviewed-on: https://boringssl-review.googlesource.com/5872 Reviewed-by: Adam Langley <agl@google.com> |
||
---|---|---|
.. | ||
pqueue | ||
test | ||
CMakeLists.txt | ||
custom_extensions.c | ||
d1_both.c | ||
d1_clnt.c | ||
d1_lib.c | ||
d1_meth.c | ||
d1_pkt.c | ||
d1_srtp.c | ||
d1_srvr.c | ||
dtls_record.c | ||
internal.h | ||
s3_both.c | ||
s3_clnt.c | ||
s3_enc.c | ||
s3_lib.c | ||
s3_meth.c | ||
s3_pkt.c | ||
s3_srvr.c | ||
ssl_aead_ctx.c | ||
ssl_asn1.c | ||
ssl_buffer.c | ||
ssl_cert.c | ||
ssl_cipher.c | ||
ssl_file.c | ||
ssl_lib.c | ||
ssl_rsa.c | ||
ssl_sess.c | ||
ssl_stat.c | ||
ssl_test.cc | ||
ssl_txt.c | ||
t1_enc.c | ||
t1_lib.c | ||
tls_record.c |