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

Unified Diff: net/socket/ssl_client_socket_openssl.h

Issue 3571011: implement certificate verification state machine (Closed)
Patch Set: wtc comments Created 10 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
« no previous file with comments | « no previous file | net/socket/ssl_client_socket_openssl.cc » ('j') | net/socket/ssl_client_socket_openssl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/ssl_client_socket_openssl.h
diff --git a/net/socket/ssl_client_socket_openssl.h b/net/socket/ssl_client_socket_openssl.h
index 1799a629f474143fdac63699677875f689ef62ba..ce450aef299c7257ec448f02bee6c95724f23baa 100644
--- a/net/socket/ssl_client_socket_openssl.h
+++ b/net/socket/ssl_client_socket_openssl.h
@@ -7,6 +7,7 @@
#pragma once
#include "base/scoped_ptr.h"
+#include "net/base/cert_verify_result.h"
#include "net/base/completion_callback.h"
#include "net/base/io_buffer.h"
#include "net/base/ssl_config_service.h"
@@ -19,6 +20,7 @@ typedef struct x509_store_ctx_st X509_STORE_CTX;
namespace net {
+class CertVerifier;
class SSLCertRequestInfo;
class SSLConfig;
class SSLInfo;
@@ -68,7 +70,11 @@ class SSLClientSocketOpenSSL : public SSLClientSocket {
bool DoTransportIO();
int DoHandshake();
+ int DoVerifyCert(int result);
+ int DoVerifyCertComplete(int result);
void DoConnectCallback(int result);
+ void InvalidateSessionIfBadCertificate();
+ X509Certificate* UpdateServerCert();
void OnHandshakeIOComplete(int result);
void OnSendComplete(int result);
@@ -106,11 +112,18 @@ class SSLClientSocketOpenSSL : public SSLClientSocket {
scoped_refptr<IOBuffer> user_write_buf_;
int user_write_buf_len_;
+ // Set when handshake finishes.
+ scoped_refptr<X509Certificate> server_cert_;
+ CertVerifyResult server_cert_verify_result_;
+
// Stores client authentication information between ClientAuthHandler and
// GetSSLCertRequestInfo calls.
std::vector<scoped_refptr<X509Certificate> > client_certs_;
bool client_auth_cert_needed_;
+ scoped_ptr<CertVerifier> verifier_;
+ CompletionCallbackImpl<SSLClientSocketOpenSSL> handshake_io_callback_;
+
// OpenSSL stuff
SSL* ssl_;
BIO* transport_bio_;
« no previous file with comments | « no previous file | net/socket/ssl_client_socket_openssl.cc » ('j') | net/socket/ssl_client_socket_openssl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698