Commit bc9d2c8e authored by Matt Menke's avatar Matt Menke Committed by Commit Bot

Add field to TLSClientSocketOptions to request SSLInfo.

The only previous way to get it was to disable cert verification.

Bug: 848078
Cq-Include-Trybots: luci.chromium.try:linux_mojo
Change-Id: Ic14d5273a803cb53e92bbc370a16f045c86bdcca
Reviewed-on: https://chromium-review.googlesource.com/1235173
Commit-Queue: Matt Menke <mmenke@chromium.org>
Reviewed-by: default avatarTom Sepez <tsepez@chromium.org>
Reviewed-by: default avatarMaks Orlovich <morlovich@chromium.org>
Cr-Commit-Position: refs/heads/master@{#593419}
parent c88b7dcb
......@@ -20,6 +20,11 @@ interface TLSClientSocket {
struct TLSClientSocketOptions {
SSLVersion version_min = kTLS1;
SSLVersion version_max = kTLS12;
// If |true|, the SSLInfo will be returned in the UpgradeToTLS callback.
// If true, the SSLInfo will be returned in the UpgradeToTLS callback on
// success.
bool send_ssl_info = false;
// If true, the SSLInfo will also be returned in the UpgradeToTLS callback.
bool unsafely_skip_cert_verification = false;
};
......@@ -121,6 +121,8 @@ void TLSSocketFactory::CreateTLSClientSocket(
ssl_config.version_max =
mojo::MojoSSLVersionToNetSSLVersion(socket_options->version_max);
send_ssl_info = socket_options->send_ssl_info;
if (socket_options->unsafely_skip_cert_verification) {
if (!no_verification_cert_verifier_) {
no_verification_cert_verifier_ = base::WrapUnique(new FakeCertVerifier);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment