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

Unified Diff: net/socket/ssl_client_socket.h

Issue 994743003: Support for client certs in ssl_server_socket. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Passing this CL to RyanChung for further work. 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
« no previous file with comments | « net/socket/nss_ssl_util.cc ('k') | net/socket/ssl_client_socket_nss.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..bc7dc2b771d8c26bb59b7e640a97ecdfe7a3434b 100644
--- a/net/socket/ssl_client_socket.h
+++ b/net/socket/ssl_client_socket.h
@@ -15,6 +15,10 @@
#include "net/socket/stream_socket.h"
#include "net/ssl/ssl_failure_state.h"
+namespace crypto {
+class RSAPrivateKey;
+}
+
namespace net {
class CertPolicyEnforcer;
@@ -24,6 +28,7 @@ class CTVerifier;
class SSLCertRequestInfo;
struct SSLConfig;
class SSLInfo;
+class SSLPrivateKey;
class TransportSecurityState;
class X509Certificate;
@@ -181,6 +186,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 ForceClientCertificateAndKeyForTest(
+ scoped_refptr<X509Certificate> client_cert,
+ scoped_ptr<SSLPrivateKey> client_private_key) {}
+
private:
FRIEND_TEST_ALL_PREFIXES(SSLClientSocket, SerializeNextProtos);
// For signed_cert_timestamps_received_ and stapled_ocsp_response_received_.
@@ -192,6 +203,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_;
« no previous file with comments | « net/socket/nss_ssl_util.cc ('k') | net/socket/ssl_client_socket_nss.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698