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

Unified Diff: net/der/tag.cc

Issue 1214933009: Class for parsing and evaluating RFC 5280 NameConstraints. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@compare_DN2
Patch Set: review changes for comment #12 Created 5 years, 2 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
Index: net/der/tag.cc
diff --git a/net/der/tag.cc b/net/der/tag.cc
index a8240243943b2ab9339ae8021612efcee60990f2..99acf8cdfd856a4f4dfd84180c97d8a0791e42c6 100644
--- a/net/der/tag.cc
+++ b/net/der/tag.cc
@@ -20,10 +20,18 @@ Tag ContextSpecificPrimitive(uint8_t base) {
return (base & kTagNumberMask) | kTagPrimitive | kTagContextSpecific;
}
+bool IsContextSpecific(Tag tag) {
+ return (tag & kTagClassMask) == kTagContextSpecific;
+}
+
bool IsConstructed(Tag tag) {
return (tag & kTagConstructionMask) == kTagConstructed;
}
+uint8_t GetTagNumber(Tag tag) {
+ return tag & kTagNumberMask;
+}
+
} // namespace der
} // namespace net
« net/cert/internal/name_constraints.cc ('K') | « net/der/tag.h ('k') | net/net.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698