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

Unified Diff: net/socket/ssl_client_socket_nss.h

Issue 220009: Provides a certificate for SSL client authentication on NSS sockets.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 2 months 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_nss.h
===================================================================
--- net/socket/ssl_client_socket_nss.h (revisiĆ³n: 28534)
+++ net/socket/ssl_client_socket_nss.h (copia de trabajo)
@@ -10,9 +10,12 @@
#define Lock FOO_NSS_Lock
#include <certt.h>
#undef Lock
+#include <keyt.h>
#include <nspr.h>
#include <nss.h>
+
#include <string>
+#include <vector>
#include "base/scoped_ptr.h"
#include "net/base/cert_verify_result.h"
@@ -77,6 +80,12 @@
// argument.
static SECStatus OwnAuthCertHandler(void* arg, PRFileDesc* socket,
PRBool checksig, PRBool is_server);
+ // NSS calls this when client authentication is requested.
+ static SECStatus ClientAuthHandler(void* arg,
+ PRFileDesc* socket,
+ CERTDistNames* ca_names,
+ CERTCertificate** result_certificate,
+ SECKEYPrivateKey** result_private_key);
// NSS calls this when handshake is completed. We pass 'this' as the second
// argument.
static void HandshakeCallback(PRFileDesc* socket, void* arg);
@@ -103,6 +112,10 @@
scoped_refptr<X509Certificate> server_cert_;
CertVerifyResult server_cert_verify_result_;
+ // Stores client authentication information between ClientAuthHandler calls
+ CERTDistNames* client_auth_ca_names_;
+ bool client_auth_cert_needed_;
+
scoped_ptr<CertVerifier> verifier_;
bool completed_handshake_;

Powered by Google App Engine
This is Rietveld 408576698