boringssl/ssl
David Benjamin a660e7ab67 Don't clear cert_request in ssl3_send_client_certificate.
Instead, add ssl_has_certificate to the ssl3_send_cert_verify check. If
writing the empty Certificate does not complete synchronously (it almost
always does due to the buffer BIO), but if the buffer boundary is at
exactly the wrong place, write_message will need a retry but, having
cleared cert_request, we never re-enter ssl3_send_client_certificate.

This will later be moot when we've gotten rid of the buffer BIO, but
this is cleaner anyway and is closer to the TLS 1.3 code.

With this change, blindly taking away the BIO buffer in TLS (which is
not what we want since we want the entire flight in one write but is a
nice sanity check), only the SSL 3.0 no client certificate tests fail.
They too rely on some writes completing synchronously due to SSL 3.0
sending a warning alert. There is a similar bug when
tlsext_servername_callback returns SSL_TLSEXT_ERR_ALERT_WARNING.

Those will be resolved after reworking the write path since it's a bit
of a mess.

Change-Id: I56b4df6163cae1df263cf36f0d93046d0375a5ac
Reviewed-on: https://boringssl-review.googlesource.com/13052
Reviewed-by: David Benjamin <davidben@google.com>
2017-01-04 04:50:00 +00:00
..
test Add a test for renegotiation on busy write buffer. 2017-01-04 01:54:57 +00:00
CMakeLists.txt
custom_extensions.c Pass explicit hs parameters into custom_extensions.c. 2016-12-06 19:49:36 +00:00
d1_both.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
d1_lib.c Add a helper function for resetting SSL_get_error state. 2017-01-04 04:48:44 +00:00
d1_pkt.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
d1_srtp.c Fix ssl_ctx_make_profiles error handling. 2016-09-27 13:27:06 +00:00
dtls_method.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
dtls_record.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
handshake_client.c Don't clear cert_request in ssl3_send_client_certificate. 2017-01-04 04:50:00 +00:00
handshake_server.c Clean up certificate auto-chaining. 2017-01-04 01:36:26 +00:00
internal.h Add a helper function for resetting SSL_get_error state. 2017-01-04 04:48:44 +00:00
s3_both.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
s3_enc.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
s3_lib.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
s3_pkt.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
ssl_aead_ctx.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
ssl_asn1.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
ssl_buffer.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
ssl_cert.c Clean up certificate auto-chaining. 2017-01-04 01:36:26 +00:00
ssl_cipher.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
ssl_ecdh.c Remove New Hope key agreement. 2016-12-10 01:06:31 +00:00
ssl_file.c Check for sk_X509_NAME_push failures. 2016-09-27 13:18:37 +00:00
ssl_lib.c Add a helper function for resetting SSL_get_error state. 2017-01-04 04:48:44 +00:00
ssl_rsa.c Rename X.509 members in |SSL_SESSION| and |CERT|. 2016-11-09 20:07:57 +00:00
ssl_session.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
ssl_stat.c Move state and next_state to SSL_HANDSHAKE. 2016-12-12 22:09:01 +00:00
ssl_test.cc Clean up certificate auto-chaining. 2017-01-04 01:36:26 +00:00
t1_enc.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
t1_lib.c Add experimental TLS 1.3 short record header extension. 2016-12-21 22:06:44 +00:00
tls13_both.c Make TLS 1.3 check ECDSA KeyUsage and add test. 2016-12-14 17:56:55 +00:00
tls13_client.c Clean up certificate auto-chaining. 2017-01-04 01:36:26 +00:00
tls13_enc.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
tls13_server.c Clean up certificate auto-chaining. 2017-01-04 01:36:26 +00:00
tls_method.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
tls_record.c Add experimental TLS 1.3 short record header extension. 2016-12-21 22:06:44 +00:00