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

Unified Diff: net/ssl/ssl_server_config.h

Issue 1474983003: Support for client certs in ssl_server_socket. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed nits on utils Created 5 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
Index: net/ssl/ssl_server_config.h
diff --git a/net/ssl/ssl_server_config.h b/net/ssl/ssl_server_config.h
index 6e712fb88c2719e12f0cb5eef8a9b9f0cc1058a2..dd5e1abc2b7453be64e9e42eacac7aa540887833 100644
--- a/net/ssl/ssl_server_config.h
+++ b/net/ssl/ssl_server_config.h
@@ -14,6 +14,8 @@
namespace net {
+class ClientCertVerifier;
+
// A collection of server-side SSL-related configuration settings.
struct NET_EXPORT SSLServerConfig {
// Defaults
@@ -56,6 +58,29 @@ struct NET_EXPORT SSLServerConfig {
// Requires a client certificate for client authentication from the client.
// This doesn't currently enforce certificate validity.
bool require_client_cert;
+
+ // Provides the list of certificates whose names are to be included in the
+ // CertificateRequest handshake message. This member is only useful if
+ // certificates are allowed.
davidben 2015/12/14 23:56:51 Nit: Slightly shorter: // A list of certificate
ryanchung 2015/12/16 22:40:03 Done.
+ CertificateList client_cert_ca_list;
+
+ // Indicates that a client certificate is required, and provides the
davidben 2015/12/14 23:56:51 This isn't actually true, no? require_client_cert
ryanchung 2015/12/16 22:40:03 You're right. The CertVerifyCallback in SSLServerS
+ // CertificateVerifier that is to be used to verify it during the handshake.
+ // The |client_cert_verifier| continues to be owned by the caller,
+ // and must exist at least until the handshake has completed.
davidben 2015/12/14 23:56:51 and must exist [...] -> and must outlive any socke
ryanchung 2015/12/16 22:40:03 Done.
+ // This field is meaningful only if client certificates are required.
+ // NOTES:
+ // 1. If no CertificateVerifier is provided, then a client certificate may
+ // still be allowed (if ssl_server_config.send_client_cert is true),
davidben 2015/12/14 23:56:51 What's send_client_cert?
ryanchung 2015/12/16 22:40:02 Sorry, this is now called require_client_cert.
+ // but in that case verification must be done after the handshake
+ // has completed, by which time the session will have been cached,
+ // and may be subject to resumption.
davidben 2015/12/14 23:56:51 This API doesn't do session caching right now.
ryanchung 2015/12/16 22:40:03 Done.
+ // 2. OpenSSL expects the certificate verification callback to complete
+ // synchronously.
davidben 2015/12/14 23:56:51 This note seems unnecessary. If you want to make i
ryanchung 2015/12/16 22:40:03 Done. Removed note.
+ // 3. For verifying a client certificate, the CertVerifier::Verify method
+ // will be called with input parameters as follows:
+ // - cert: the cert to be verified
davidben 2015/12/14 23:56:51 This seems unnecessary.
ryanchung 2015/12/16 22:40:03 Done.
+ ClientCertVerifier* client_cert_verifier;
};
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698