boringssl/ssl
David Benjamin 4cce955d14 Fix thread-safety bug in SSL_get_peer_cert_chain.
https://boringssl-review.googlesource.com/12704 pushed it just too far
to the edge. Once we have an established SSL_SESSION, any modifications
need to either be locked or done ahead of time. Do it ahead of time.
session->is_server gives a suitable place to check and X509s are
ref-counted so this should be cheap.

Add a regression test via TSan. Confirmed that TSan indeed catches this.

Change-Id: I30ce7b757d3a44465b318af3c98961ff3667483e
Reviewed-on: https://boringssl-review.googlesource.com/c/33606
Commit-Queue: Adam Langley <agl@google.com>
Reviewed-by: Adam Langley <agl@google.com>
2018-12-13 19:30:49 +00:00
..
test Remove HRSS confirmation hash. 2018-12-13 18:42:02 +00:00
bio_ssl.cc
CMakeLists.txt Support symbol prefixes 2018-09-06 20:07:52 +00:00
d1_both.cc Remove the add_alert hook. 2018-09-15 00:55:02 +00:00
d1_lib.cc Support symbol prefixes 2018-09-06 20:07:52 +00:00
d1_pkt.cc Support symbol prefixes 2018-09-06 20:07:52 +00:00
d1_srtp.cc A bunch more scopers. 2018-07-06 19:43:08 +00:00
dtls_method.cc Remove the add_alert hook. 2018-09-15 00:55:02 +00:00
dtls_record.cc Another batch of bools. 2018-09-07 15:06:55 +00:00
handoff.cc Add initial HRSS support. 2018-12-12 17:35:02 +00:00
handshake_client.cc Add initial HRSS support. 2018-12-12 17:35:02 +00:00
handshake_server.cc Add initial HRSS support. 2018-12-12 17:35:02 +00:00
handshake.cc Work around a JDK 11 TLS 1.3 bug. 2018-11-21 18:22:57 +00:00
internal.h Add initial HRSS support. 2018-12-12 17:35:02 +00:00
s3_both.cc Abstract hs_buf a little. 2018-11-09 19:01:04 +00:00
s3_lib.cc Support symbol prefixes 2018-09-06 20:07:52 +00:00
s3_pkt.cc Abstract hs_buf a little. 2018-11-09 19:01:04 +00:00
span_test.cc Support symbol prefixes 2018-09-06 20:07:52 +00:00
ssl_aead_ctx.cc Add an interface for QUIC integration. 2018-10-31 20:38:10 +00:00
ssl_asn1.cc Fix thread-safety bug in SSL_get_peer_cert_chain. 2018-12-13 19:30:49 +00:00
ssl_buffer.cc Support symbol prefixes 2018-09-06 20:07:52 +00:00
ssl_cert.cc Another batch of bools. 2018-09-07 15:06:55 +00:00
ssl_cipher.cc Serialize SSL configuration in handoff and check it on application. 2018-11-02 19:45:42 +00:00
ssl_file.cc Avoid modifying stack in sk_find. 2018-04-12 21:02:12 +00:00
ssl_key_share.cc Add initial HRSS support. 2018-12-12 17:35:02 +00:00
ssl_lib.cc Add |SSL_export_traffic_secrets|. 2018-12-12 22:57:33 +00:00
ssl_privkey.cc Another batch of bools. 2018-09-07 15:06:55 +00:00
ssl_session.cc Support symbol prefixes 2018-09-06 20:07:52 +00:00
ssl_stat.cc Remove trailing whitespace from ssl/. 2018-02-26 22:05:13 +00:00
ssl_test.cc Fix thread-safety bug in SSL_get_peer_cert_chain. 2018-12-13 19:30:49 +00:00
ssl_transcript.cc Support symbol prefixes 2018-09-06 20:07:52 +00:00
ssl_versions.cc Work around a JDK 11 TLS 1.3 bug. 2018-11-21 18:22:57 +00:00
ssl_x509.cc Fix thread-safety bug in SSL_get_peer_cert_chain. 2018-12-13 19:30:49 +00:00
t1_enc.cc Support symbol prefixes 2018-09-06 20:07:52 +00:00
t1_lib.cc Add initial HRSS support. 2018-12-12 17:35:02 +00:00
tls13_both.cc Work around a JDK 11 TLS 1.3 bug. 2018-11-21 18:22:57 +00:00
tls13_client.cc Add initial HRSS support. 2018-12-12 17:35:02 +00:00
tls13_enc.cc Add an interface for QUIC integration. 2018-10-31 20:38:10 +00:00
tls13_server.cc Do not allow AES_128_GCM_SHA256 with CECPQ2. 2018-12-12 20:05:52 +00:00
tls_method.cc Remove the add_alert hook. 2018-09-15 00:55:02 +00:00
tls_record.cc Another batch of bools. 2018-09-07 15:06:55 +00:00