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

Unified Diff: net/cert/client_cert_verifier.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 Created 4 years, 10 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 | « net/cert/cert_verify_result.h ('k') | net/cert/mock_client_cert_verifier.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/client_cert_verifier.h
diff --git a/net/cert/client_cert_verifier.h b/net/cert/client_cert_verifier.h
new file mode 100644
index 0000000000000000000000000000000000000000..f2044aa5e383428b49e35bca61450d06d224acbb
--- /dev/null
+++ b/net/cert/client_cert_verifier.h
@@ -0,0 +1,41 @@
+// Copyright (c) 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef NET_CERT_CLIENT_CERT_VERIFIER_H_
+#define NET_CERT_CLIENT_CERT_VERIFIER_H_
+
+#include "base/macros.h"
+#include "net/base/completion_callback.h"
+#include "net/base/net_export.h"
+
+namespace net {
+
+class X509Certificate;
+
+// ClientCertVerifier represents a service for verifying certificates.
+class NET_EXPORT ClientCertVerifier {
+ public:
+ class Request {
+ public:
+ Request() {}
+
+ // Destruction of the Request cancels it.
+ virtual ~Request() {}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(Request);
+ };
+
+ virtual ~ClientCertVerifier() {}
+
+ // Verifies the given certificate as a client certificate.
+ // Returns OK if successful or an error code upon failure.
+ virtual int Verify(X509Certificate* cert,
+ const CompletionCallback& callback,
+ scoped_ptr<Request>* out_req) = 0;
+};
+
+} // namespace net
+
+#endif // NET_CERT_CLIENT_CERT_VERIFIER_H_
« no previous file with comments | « net/cert/cert_verify_result.h ('k') | net/cert/mock_client_cert_verifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698