From 2d6e778368680b39f71e000ee03ce3430b96507a Mon Sep 17 00:00:00 2001 From: "agl@chromium.org" Date: Wed, 10 Nov 2010 22:13:46 +0000 Subject: net: assorted changes needed for Snap Start tests. In IsAllowedBadCert, the pointer compare doesn't always work. Creating a certificate by X509Certificate::CreateFromBytes and putting it in the allowed bad list doesn't match the same certificate from a server. InvalidateSessionIfBadCertificate: I'm sure that there's history here that I don't know, so please review carefully. In order to test resumption against a server with a test certificate we need to avoid destroying the session. ClearSessionCache, AdoptSocket: only for testing BUG=none TEST=none http://codereview.chromium.org/4558004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65713 0039d316-1c4b-4281-b951-d872f2087c98 --- net/socket/ssl_client_socket_nss.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'net/socket/ssl_client_socket_nss.h') diff --git a/net/socket/ssl_client_socket_nss.h b/net/socket/ssl_client_socket_nss.h index 87f7b92..d1a0a0d 100644 --- a/net/socket/ssl_client_socket_nss.h +++ b/net/socket/ssl_client_socket_nss.h @@ -72,6 +72,9 @@ class SSLClientSocketNSS : public SSLClientSocket { virtual bool SetReceiveBufferSize(int32 size); virtual bool SetSendBufferSize(int32 size); + // For tests + static void ClearSessionCache(); + private: // Initializes NSS SSL options. Returns a net error code. int InitializeSSLOptions(); @@ -79,7 +82,6 @@ class SSLClientSocketNSS : public SSLClientSocket { // Initializes the socket peer name in SSL. Returns a net error code. int InitializeSSLPeerName(); - void InvalidateSessionIfBadCertificate(); #if defined(OS_MACOSX) || defined(OS_WIN) // Creates an OS certificate from a DER-encoded certificate. static X509Certificate::OSCertHandle CreateOSCert(const SECItem& der_cert); -- cgit v1.1