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

Unified Diff: net/cert/internal/cert_issuer_source_nss.h

Issue 2535733003: pki library: Add CertIssuerSourceNSS that retrieves intermediate certs from NSS. (Closed)
Patch Set: review changes Created 4 years, 1 month 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/BUILD.gn ('k') | net/cert/internal/cert_issuer_source_nss.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/internal/cert_issuer_source_nss.h
diff --git a/net/cert/internal/cert_issuer_source_nss.h b/net/cert/internal/cert_issuer_source_nss.h
new file mode 100644
index 0000000000000000000000000000000000000000..1621b3b04577db4c436d2b31555cc8bc97647f72
--- /dev/null
+++ b/net/cert/internal/cert_issuer_source_nss.h
@@ -0,0 +1,40 @@
+// Copyright 2016 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_INTERNAL_CERT_ISSUER_SOURCE_NSS_H_
+#define NET_CERT_INTERNAL_CERT_ISSUER_SOURCE_NSS_H_
+
+#include "net/base/net_export.h"
+#include "net/cert/internal/cert_issuer_source.h"
+
+namespace net {
+
+// Returns issuers from NSS. Always returns results synchronously.
+// This will return any matches from NSS, possibly including trust anchors,
+// blacklisted/distrusted certs, and temporary/cached certs. In the current
+// implementation, trust is checked in a separate stage of path building, so
+// including trusted certs here doesn't cause any issues. In particular, a trust
+// anchor being returned here indicates the path ending in that trust anchor
+// must already have been tested and failed to verify, and now the pathbuilder
+// is trying to find a different path through that certificate. Including
+// distrusted certs is desirable so that those paths can be built (and then fail
+// to verify), leading to a better error message.
+class NET_EXPORT CertIssuerSourceNSS : public CertIssuerSource {
+ public:
+ CertIssuerSourceNSS();
+ ~CertIssuerSourceNSS() override;
+
+ // CertIssuerSource implementation:
+ void SyncGetIssuersOf(const ParsedCertificate* cert,
+ ParsedCertificateList* issuers) override;
+ void AsyncGetIssuersOf(const ParsedCertificate* cert,
+ std::unique_ptr<Request>* out_req) override;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(CertIssuerSourceNSS);
+};
+
+} // namespace net
+
+#endif // NET_CERT_INTERNAL_CERT_ISSUER_SOURCE_NSS_H_
« no previous file with comments | « net/BUILD.gn ('k') | net/cert/internal/cert_issuer_source_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698