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

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

Issue 2907523002: Add parsing for RFC 5280's PolicyMappings certificate extension. (Closed)
Patch Set: Created 3 years, 7 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/internal/certificate_policies.cc ('k') | net/cert/internal/parsed_certificate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/internal/parsed_certificate.h
diff --git a/net/cert/internal/parsed_certificate.h b/net/cert/internal/parsed_certificate.h
index c55f17c115c445b71a05c1843c16ab7aaaf60ac5..69741eb0cbbb6d657abcb7ae2d8dbceffd3841d4 100644
--- a/net/cert/internal/parsed_certificate.h
+++ b/net/cert/internal/parsed_certificate.h
@@ -208,6 +208,26 @@ class NET_EXPORT ParsedCertificate
return policy_constraints_;
}
+ // Returns true if the certificate has a PolicyMappings extension.
+ bool has_policy_mappings() const { return has_policy_mappings_; }
+
+ // Returns the PolicyMappings extension. Caller must check
+ // has_policy_mappings() before accessing this.
+ const std::vector<ParsedPolicyMapping>& policy_mappings() const {
+ DCHECK(has_policy_mappings_);
+ return policy_mappings_;
+ }
+
+ // Returns true if the certificate has a InhibitAnyPolicy extension.
+ bool has_inhibit_any_policy() const { return has_inhibit_any_policy_; }
+
+ // Returns the Inhibit Any Policy extension. Caller must check
+ // has_inhibit_any_policy() before accessing this.
+ uint8_t inhibit_any_policy() const {
+ DCHECK(has_inhibit_any_policy_);
+ return inhibit_any_policy_;
+ }
+
// Returns a map of all the extensions in the certificate.
const ExtensionsMap& extensions() const { return extensions_; }
@@ -288,6 +308,14 @@ class NET_EXPORT ParsedCertificate
bool has_policy_constraints_ = false;
ParsedPolicyConstraints policy_constraints_;
+ // Policy mappings extension.
+ bool has_policy_mappings_ = false;
+ std::vector<ParsedPolicyMapping> policy_mappings_;
+
+ // Inhibit Any Policy extension.
+ bool has_inhibit_any_policy_ = false;
+ uint8_t inhibit_any_policy_;
+
// All of the extensions.
ExtensionsMap extensions_;
« no previous file with comments | « net/cert/internal/certificate_policies.cc ('k') | net/cert/internal/parsed_certificate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698