summaryrefslogtreecommitdiffstats
path: root/net/base/ssl_client_socket_nss.h
diff options
context:
space:
mode:
authordkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-14 05:26:10 +0000
committerdkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-14 05:26:10 +0000
commitee287e40bb740d7238717a97b5f635ae3e68c47a (patch)
tree4515656a0a870939dbcf6892b48baa02c99c26ca /net/base/ssl_client_socket_nss.h
parent0afe827a49501c6801c3c9efbbdb1f64aa010beb (diff)
downloadchromium_src-ee287e40bb740d7238717a97b5f635ae3e68c47a.zip
chromium_src-ee287e40bb740d7238717a97b5f635ae3e68c47a.tar.gz
chromium_src-ee287e40bb740d7238717a97b5f635ae3e68c47a.tar.bz2
ssl_client_socket_unittest.cc: launch local server with TestServerLauncher
rather than use bugs.webkit.org, fixes TODO(darin) Add tests with bad server certs ssl_client_socket_nss.cc: fix bugs revealed by new tests tcp_pinger.cc: helper class to do synchronous connect from tests. Has to work inside ui tests where one can't use TestCompletionCallback. ssl_test_util: renamed class TestServerLauncher, added Start/Stop methods. Make part of net.lib to work around link error in test_shell_tests. url_request_unittest.h: use TestServerLauncher to manage server. SSL client tests disabled for now on Mac. BUG=7114 Review URL: http://codereview.chromium.org/16207 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9823 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/ssl_client_socket_nss.h')
-rw-r--r--net/base/ssl_client_socket_nss.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/net/base/ssl_client_socket_nss.h b/net/base/ssl_client_socket_nss.h
index 5015e1e..b16557c 100644
--- a/net/base/ssl_client_socket_nss.h
+++ b/net/base/ssl_client_socket_nss.h
@@ -5,15 +5,13 @@
#ifndef NET_BASE_SSL_CLIENT_SOCKET_NSS_H_
#define NET_BASE_SSL_CLIENT_SOCKET_NSS_H_
-#include "build/build_config.h"
-
-#include <prio.h>
-#include "net/base/nss_memio.h"
-
+#include <nspr.h>
+#include <nss.h>
#include <string>
#include "base/scoped_ptr.h"
#include "net/base/completion_callback.h"
+#include "net/base/nss_memio.h"
#include "net/base/ssl_client_socket.h"
#include "net/base/ssl_config_service.h"
@@ -60,6 +58,9 @@ class SSLClientSocketNSS : public SSLClientSocket {
void BufferSendComplete(int result);
void BufferRecvComplete(int result);
+ // nss calls this on error. We pass 'this' as the first argument.
+ static SECStatus OwnBadCertHandler(void* arg, PRFileDesc* socket);
+
CompletionCallbackImpl<SSLClientSocketNSS> buffer_send_callback_;
CompletionCallbackImpl<SSLClientSocketNSS> buffer_recv_callback_;
bool transport_send_busy_;
@@ -76,7 +77,8 @@ class SSLClientSocketNSS : public SSLClientSocket {
char* user_buf_;
int user_buf_len_;
- int server_cert_status_;
+ // Set when handshake finishes. Value is net error code, see net_errors.h
+ int server_cert_error_;
bool completed_handshake_;
@@ -91,10 +93,10 @@ class SSLClientSocketNSS : public SSLClientSocket {
};
State next_state_;
- /* The NSS SSL state machine */
+ // The NSS SSL state machine
PRFileDesc* nss_fd_;
- /* Buffers for the network end of the SSL state machine */
+ // Buffers for the network end of the SSL state machine
memio_Private* nss_bufs_;
static bool nss_options_initialized_;