#include "net/socket/ssl_client_socket.h"
#include <string>
#include "base/containers/flat_tree.h"
#include "base/logging.h"
#include "base/observer_list.h"
#include "base/values.h"
#include "net/cert/x509_certificate_net_log_param.h"
#include "net/log/net_log.h"
#include "net/log/net_log_event_type.h"
#include "net/socket/ssl_client_socket_impl.h"
#include "net/socket/stream_socket.h"
#include "net/ssl/ssl_client_session_cache.h"
#include "net/ssl/ssl_key_logger.h"
namespace net {
namespace {
bool AreCertificatesEqual(const scoped_refptr<X509Certificate>& first_cert,
const scoped_refptr<X509Certificate>& second_cert,
bool include_chain = true) { … }
base::Value::Dict NetLogClearCachedClientCertParams(
const net::HostPortPair& host,
const scoped_refptr<net::X509Certificate>& cert,
bool is_cleared) { … }
base::Value::Dict NetLogClearMatchingCachedClientCertParams(
const base::flat_set<net::HostPortPair>& hosts,
const scoped_refptr<net::X509Certificate>& cert) { … }
}
SSLClientSocket::SSLClientSocket() = default;
void SSLClientSocket::SetSSLKeyLogger(std::unique_ptr<SSLKeyLogger> logger) { … }
std::vector<uint8_t> SSLClientSocket::SerializeNextProtos(
const NextProtoVector& next_protos) { … }
SSLClientContext::SSLClientContext(
SSLConfigService* ssl_config_service,
CertVerifier* cert_verifier,
TransportSecurityState* transport_security_state,
SSLClientSessionCache* ssl_client_session_cache,
SCTAuditingDelegate* sct_auditing_delegate)
: … { … }
SSLClientContext::~SSLClientContext() { … }
std::unique_ptr<SSLClientSocket> SSLClientContext::CreateSSLClientSocket(
std::unique_ptr<StreamSocket> stream_socket,
const HostPortPair& host_and_port,
const SSLConfig& ssl_config) { … }
bool SSLClientContext::GetClientCertificate(
const HostPortPair& server,
scoped_refptr<X509Certificate>* client_cert,
scoped_refptr<SSLPrivateKey>* private_key) { … }
void SSLClientContext::SetClientCertificate(
const HostPortPair& server,
scoped_refptr<X509Certificate> client_cert,
scoped_refptr<SSLPrivateKey> private_key) { … }
bool SSLClientContext::ClearClientCertificate(const HostPortPair& server) { … }
void SSLClientContext::AddObserver(Observer* observer) { … }
void SSLClientContext::RemoveObserver(Observer* observer) { … }
void SSLClientContext::OnSSLContextConfigChanged() { … }
void SSLClientContext::OnCertVerifierChanged() { … }
void SSLClientContext::OnTrustStoreChanged() { … }
void SSLClientContext::OnClientCertStoreChanged() { … }
void SSLClientContext::ClearClientCertificateIfNeeded(
const net::HostPortPair& host,
const scoped_refptr<net::X509Certificate>& certificate) { … }
void SSLClientContext::ClearMatchingClientCertificate(
const scoped_refptr<net::X509Certificate>& certificate) { … }
void SSLClientContext::NotifySSLConfigChanged(SSLConfigChangeType change_type) { … }
void SSLClientContext::NotifySSLConfigForServersChanged(
const base::flat_set<HostPortPair>& servers) { … }
}