boringssl/include/openssl
David Benjamin 9faafdaeb8 Clean up do_ssl3_write fragment handling.
Separate actually writing the fragment to the network from assembling it so
there is no need for is_fragment. record_split_done also needn't be a global;
as of 7fdeaf1101, it is always reset to 0 whether
or not SSL3_WANT_WRITE occurred, despite the comment.

I believe this is sound, but the pre-7fdeaf1 logic wasn't quiiite right;
ssl3_write_pending allows a retry to supply *additional* data, so not all
plaintext had been commited to before the IV was randomized. We could fix this
by tracking how many bytes were committed to the last time we fragmented, but
this is purely an optimization and doesn't seem worth the complexity.

This also fixes the alignment computation in the record-splitting case. The
extra byte was wrong, as demonstrated by the assert.

Change-Id: Ia087a45a6622f4faad32e501942cc910eca1237b
Reviewed-on: https://boringssl-review.googlesource.com/4234
Reviewed-by: Adam Langley <agl@google.com>
2015-04-06 18:53:15 +00:00
..
aead.h Add AEADs for AES-CTR with HMAC-SHA256. 2015-03-18 21:16:55 +00:00
aes.h Add some more Android compatibility declarations. 2015-03-20 11:50:29 -07:00
asn1_mac.h
asn1.h Fix a couple of issues with building with strict C99. 2015-03-18 21:17:40 +00:00
asn1t.h Fix Windows shared library build. 2014-10-01 02:01:53 +00:00
base64.h Various documentation fixes. 2015-01-14 21:50:50 +00:00
base.h Support MIPS64. 2015-03-31 22:27:10 +00:00
bio.h Typo fix in comment. 2015-03-18 22:01:26 +00:00
bn.h Convert bn_test to C++. 2015-04-01 19:53:51 +00:00
buf.h Reset all the error codes. 2015-02-11 23:12:08 +00:00
bytestring.h Don't accept tag number 31 (long form identifier octets) in CBB_add_asn1. 2015-02-03 11:03:59 -08:00
chacha.h
cipher.h Add AEADs for AES-CTR with HMAC-SHA256. 2015-03-18 21:16:55 +00:00
conf.h Reset all the error codes. 2015-02-11 23:12:08 +00:00
cpu.h Never set RC4_CHAR. 2015-02-20 23:59:59 +00:00
crypto.h Reset all the error codes. 2015-02-11 23:12:08 +00:00
des.h Add support for 3DES ECB. 2015-03-18 19:55:14 +00:00
dh.h Reset all the error codes. 2015-02-11 23:12:08 +00:00
digest.h Various documentation fixes. 2015-01-14 21:50:50 +00:00
dsa.h Reset all the error codes. 2015-02-11 23:12:08 +00:00
dtls1.h Remove ccs_header_st. 2015-03-10 01:13:01 +00:00
ec_key.h
ec.h Unexport EC_GROUP_copy. 2015-02-27 19:43:02 +00:00
ecdh.h Reset all the error codes. 2015-02-11 23:12:08 +00:00
ecdsa.h Reset all the error codes. 2015-02-11 23:12:08 +00:00
engine.h Remove support for dynamic METHODs. 2015-02-06 20:56:10 +00:00
err.h Precompute sorted array for error strings. 2015-02-09 17:35:31 -08:00
evp.h Remove unused fields from EVP_PKEY. 2015-03-25 15:32:33 +00:00
ex_data.h
hkdf.h Implement HKDF. 2014-12-18 20:13:06 +00:00
hmac.h Forbid reusing HMAC key without reusing the hash function. 2015-03-02 23:16:12 +00:00
lhash_macros.h Remove more bits of ERR_STRING_DATA. 2015-02-10 02:10:46 +00:00
lhash.h Remove more bits of ERR_STRING_DATA. 2015-02-10 02:10:46 +00:00
md4.h Add digest_test with tests for all existing EVP_MDs. 2014-11-06 01:49:03 +00:00
md5.h Readd MD4. 2014-08-26 21:51:48 +00:00
mem.h Various documentation fixes. 2015-01-14 21:50:50 +00:00
modes.h
obj_mac.h Renegerate OID outputs. 2014-12-04 22:13:50 +00:00
obj.h Reset all the error codes. 2015-02-11 23:12:08 +00:00
objects.h
opensslfeatures.h Remove remaining remnants of RIPEMD-160 support. 2015-03-17 21:03:42 +00:00
opensslv.h Add some more Android compatibility declarations. 2015-03-20 11:50:29 -07:00
ossl_typ.h
pem.h Reset all the error codes. 2015-02-11 23:12:08 +00:00
pkcs7.h
pkcs8.h Reset all the error codes. 2015-02-11 23:12:08 +00:00
pkcs12.h
poly1305.h Always write the Poly1305 tag to an aligned buffer. 2015-01-14 23:38:25 +00:00
pqueue.h Export pqueue functions. 2014-09-03 21:38:19 +00:00
rand.h
rc4.h Add SSL_get_rc4_state. 2015-03-18 19:54:34 +00:00
rsa.h Export the PSS padding functions. 2015-03-31 22:26:57 +00:00
safestack.h Rename safe_stack.h to safestack.h. 2015-02-20 23:33:48 +00:00
sha.h Fix SHA-384 and -512 in NO_ASM mode. 2015-03-05 22:44:00 +00:00
srtp.h Store SRTP_PROTECTION_PROFILES as const. 2015-01-14 22:10:08 +00:00
ssl2.h
ssl3.h Clean up do_ssl3_write fragment handling. 2015-04-06 18:53:15 +00:00
ssl23.h Reformat SSL/TLS headers. 2015-01-26 20:23:09 +00:00
ssl.h Clean up do_ssl3_write fragment handling. 2015-04-06 18:53:15 +00:00
stack_macros.h Add sk_deep_copy and its macro. 2015-02-13 10:59:10 -08:00
stack.h Fix a couple of issues with building with strict C99. 2015-03-18 21:17:40 +00:00
thread.h Fix CRYPTO_add_lock documentation. 2015-03-23 23:08:20 +00:00
time_support.h Various documentation fixes. 2015-01-14 21:50:50 +00:00
tls1.h Remove finish_mac_length from SSL3_ENC_METHOD. 2015-03-10 01:16:17 +00:00
type_check.h
x509_vfy.h Update API to use (char *) for email addresses and hostnames. 2015-02-13 11:00:48 -08:00
x509.h Add support for reading PKCS#7 data from PEM files. 2015-02-27 21:02:38 +00:00
x509v3.h Update API to use (char *) for email addresses and hostnames. 2015-02-13 11:00:48 -08:00