Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2783)

Unified Diff: net/socket/ssl_client_socket.h

Issue 1474983003: Support for client certs in ssl_server_socket. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/socket/ssl_client_socket.h
diff --git a/net/socket/ssl_client_socket.h b/net/socket/ssl_client_socket.h
index ad458b2665e97aab42136390e39fac6ed1ac33b0..16afbee75caca1411984bec378785c6fea3ad7df 100644
--- a/net/socket/ssl_client_socket.h
+++ b/net/socket/ssl_client_socket.h
@@ -24,6 +24,7 @@ class CTVerifier;
class SSLCertRequestInfo;
struct SSLConfig;
class SSLInfo;
+class SSLPrivateKey;
class TransportSecurityState;
class X509Certificate;
@@ -181,6 +182,12 @@ class NET_EXPORT SSLClientSocket : public SSLSocket {
static std::vector<uint8_t> SerializeNextProtos(
const NextProtoVector& next_protos);
+ // For unit testing only.
+ // Specify a client certificate and the RSA private key to be used with it.
+ virtual void ForceClientCertificateAndKeyForTesting(
+ const scoped_refptr<X509Certificate>& client_cert,
+ scoped_ptr<SSLPrivateKey> client_private_key) {}
davidben 2015/12/01 22:35:17 This should no longer be necessary if you rebase.
ryanchung 2015/12/02 23:57:03 Awesome. Done.
+
private:
FRIEND_TEST_ALL_PREFIXES(SSLClientSocket, SerializeNextProtos);
// For signed_cert_timestamps_received_ and stapled_ocsp_response_received_.
@@ -192,6 +199,7 @@ class NET_EXPORT SSLClientSocket : public SSLSocket {
ConnectSignedCertTimestampsDisabled);
FRIEND_TEST_ALL_PREFIXES(SSLClientSocketTest,
VerifyServerChainProperlyOrdered);
+ friend class SSLServerSocketTest;
// True if SCTs were received via a TLS extension.
bool signed_cert_timestamps_received_;

Powered by Google App Engine
This is Rietveld 408576698