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> |
||
---|---|---|
.. | ||
aead.h | ||
aes.h | ||
arm_arch.h | ||
asn1_mac.h | ||
asn1.h | ||
asn1t.h | ||
base64.h | ||
base.h | ||
bio.h | ||
blowfish.h | ||
bn.h | ||
buf.h | ||
buffer.h | ||
bytestring.h | ||
cast.h | ||
chacha.h | ||
cipher.h | ||
cmac.h | ||
conf.h | ||
cpu.h | ||
crypto.h | ||
des.h | ||
dh.h | ||
digest.h | ||
dsa.h | ||
dtls1.h | ||
ec_key.h | ||
ec.h | ||
ecdh.h | ||
ecdsa.h | ||
engine.h | ||
err.h | ||
evp.h | ||
ex_data.h | ||
hkdf.h | ||
hmac.h | ||
lhash_macros.h | ||
lhash.h | ||
md4.h | ||
md5.h | ||
mem.h | ||
modes.h | ||
obj_mac.h | ||
obj.h | ||
objects.h | ||
opensslfeatures.h | ||
opensslv.h | ||
ossl_typ.h | ||
pem.h | ||
pkcs7.h | ||
pkcs8.h | ||
pkcs12.h | ||
poly1305.h | ||
pqueue.h | ||
rand.h | ||
rc4.h | ||
rsa.h | ||
safestack.h | ||
sha.h | ||
srtp.h | ||
ssl3.h | ||
ssl.h | ||
stack_macros.h | ||
stack.h | ||
thread.h | ||
time_support.h | ||
tls1.h | ||
type_check.h | ||
x509_vfy.h | ||
x509.h | ||
x509v3.h |