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

Unified Diff: net/socket/ssl_client_socket_openssl.cc

Issue 5587001: Follow-up fixes for comments from wtc on patch http://codereview.chromium.org/5195001 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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/base/x509_openssl_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/ssl_client_socket_openssl.cc
diff --git a/net/socket/ssl_client_socket_openssl.cc b/net/socket/ssl_client_socket_openssl.cc
index 7fe771235dd7a7e3cd2a270fab7c639462ef5df0..0c025078631fc0cd7c1dac3886fba4aa28beb09b 100644
--- a/net/socket/ssl_client_socket_openssl.cc
+++ b/net/socket/ssl_client_socket_openssl.cc
@@ -323,6 +323,31 @@ bool SSLClientSocketOpenSSL::Init() {
return true;
}
+int SSLClientSocketOpenSSL::ClientCertRequestCallback(SSL* ssl,
+ X509** x509,
+ EVP_PKEY** pkey) {
+ DVLOG(3) << "OpenSSL ClientCertRequestCallback called";
+ DCHECK(ssl == ssl_);
+ DCHECK(*x509 == NULL);
+ DCHECK(*pkey == NULL);
+
+ if (!ssl_config_.send_client_cert) {
+ client_auth_cert_needed_ = true;
+ return -1; // Suspends handshake.
+ }
+
+ // Second pass: a client certificate should have been selected.
+ if (ssl_config_.client_cert) {
+ // TODO(joth): We need a way to lookup the private key this
+ // certificate. See http://crbug.com/64951 and example code in
+ // http://codereview.chromium.org/5195001/diff/6001/net/socket/ssl_client_socket_openssl.cc
+ NOTIMPLEMENTED();
+ }
+
+ // Send no client certificate.
+ return 0;
+}
+
// SSLClientSocket methods
void SSLClientSocketOpenSSL::GetSSLInfo(SSLInfo* ssl_info) {
@@ -542,31 +567,6 @@ int SSLClientSocketOpenSSL::DoHandshake() {
return net_error;
}
-int SSLClientSocketOpenSSL::ClientCertRequestCallback(SSL* ssl,
- X509** x509,
- EVP_PKEY** pkey) {
- DVLOG(3) << "OpenSSL ClientCertRequestCallback called";
- DCHECK(ssl == ssl_);
- DCHECK(*x509 == NULL);
- DCHECK(*pkey == NULL);
-
- if (!ssl_config_.send_client_cert) {
- client_auth_cert_needed_ = true;
- return -1; // Suspends handshake.
- }
-
- // Second pass: a client certificate should have been selected.
- if (ssl_config_.client_cert) {
- // TODO(joth): We need a way to lookup the private key this
- // certificate. See http://crbug.com/64951 and example code in
- // http://codereview.chromium.org/5195001/diff/6001/net/socket/ssl_client_socket_openssl.cc
- NOTIMPLEMENTED();
- }
-
- // Send no client certificate.
- return 0;
-}
-
int SSLClientSocketOpenSSL::DoVerifyCert(int result) {
DCHECK(server_cert_);
GotoState(STATE_VERIFY_CERT_COMPLETE);
« no previous file with comments | « net/base/x509_openssl_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698