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

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

Issue 2872113002: Add parsing code for RFC 5280 PolicyConstraints. (Closed)
Patch Set: update ios bundle_data 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/BUILD.gn ('k') | net/cert/internal/certificate_policies.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/internal/certificate_policies.h
diff --git a/net/cert/internal/certificate_policies.h b/net/cert/internal/certificate_policies.h
index e2ac13fd4e0a21408e785f3f5167545b5ce7c7a3..9c375d64b8e1d4f8392eaa5b9cb9387412afb0dc 100644
--- a/net/cert/internal/certificate_policies.h
+++ b/net/cert/internal/certificate_policies.h
@@ -5,8 +5,11 @@
#ifndef NET_CERT_INTERNAL_CERTIFICATE_POLICIES_H_
#define NET_CERT_INTERNAL_CERTIFICATE_POLICIES_H_
+#include <stdint.h>
+
#include <vector>
+#include "base/compiler_specific.h"
#include "net/base/net_export.h"
namespace net {
@@ -31,6 +34,20 @@ NET_EXPORT bool ParseCertificatePoliciesExtension(
const der::Input& extension_value,
std::vector<der::Input>* policies);
+struct ParsedPolicyConstraints {
+ bool has_require_explicit_policy = false;
+ uint8_t require_explicit_policy = 0;
+
+ bool has_inhibit_policy_mapping = false;
+ uint8_t inhibit_policy_mapping = 0;
+};
+
+// Parses a PolicyConstraints SEQUENCE as defined by RFC 5280. Returns true on
+// success, and sets |out|.
+NET_EXPORT bool ParsePolicyConstraints(const der::Input& policy_constraints_tlv,
+ ParsedPolicyConstraints* out)
+ WARN_UNUSED_RESULT;
+
} // namespace net
#endif // NET_CERT_INTERNAL_CERTIFICATE_POLICIES_H_
« no previous file with comments | « net/BUILD.gn ('k') | net/cert/internal/certificate_policies.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698