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

Side by Side Diff: net/der/tag.h

Issue 1125333005: RFC 2459 name comparison. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: changes for comment #23 Created 5 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_DER_TAG_H_ 5 #ifndef NET_DER_TAG_H_
6 #define NET_DER_TAG_H_ 6 #define NET_DER_TAG_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "net/base/net_export.h" 10 #include "net/base/net_export.h"
(...skipping 12 matching lines...) Expand all
23 23
24 // Universal class primitive types 24 // Universal class primitive types
25 const Tag kBool = 0x01; 25 const Tag kBool = 0x01;
26 const Tag kInteger = 0x02; 26 const Tag kInteger = 0x02;
27 const Tag kBitString = 0x03; 27 const Tag kBitString = 0x03;
28 const Tag kOctetString = 0x04; 28 const Tag kOctetString = 0x04;
29 const Tag kNull = 0x05; 29 const Tag kNull = 0x05;
30 const Tag kOid = 0x06; 30 const Tag kOid = 0x06;
31 const Tag kUtf8String = 0x0C; 31 const Tag kUtf8String = 0x0C;
32 const Tag kPrintableString = 0x13; 32 const Tag kPrintableString = 0x13;
33 const Tag kIA5String = 0x16;
33 const Tag kUtcTime = 0x17; 34 const Tag kUtcTime = 0x17;
34 const Tag kGeneralizedTime = 0x18; 35 const Tag kGeneralizedTime = 0x18;
36 const Tag kUniversalString = 0x1C;
37 const Tag kBmpString = 0x1E;
35 38
36 // Universal class constructed types 39 // Universal class constructed types
37 const Tag kSequence = 0x30; 40 const Tag kSequence = 0x30;
38 const Tag kSet = 0x31; 41 const Tag kSet = 0x31;
39 42
40 // Primitive/constructed bits 43 // Primitive/constructed bits
41 const uint8_t kTagPrimitive = 0x00; 44 const uint8_t kTagPrimitive = 0x00;
42 const uint8_t kTagConstructed = 0x20; 45 const uint8_t kTagConstructed = 0x20;
43 46
44 // Tag classes 47 // Tag classes
45 const uint8_t kTagUniversal = 0x00; 48 const uint8_t kTagUniversal = 0x00;
46 const uint8_t kTagApplication = 0x40; 49 const uint8_t kTagApplication = 0x40;
47 const uint8_t kTagContextSpecific = 0x80; 50 const uint8_t kTagContextSpecific = 0x80;
48 const uint8_t kTagPrivate = 0xC0; 51 const uint8_t kTagPrivate = 0xC0;
49 52
50 // Masks for the 3 components of a tag (class, primitive/constructed, number) 53 // Masks for the 3 components of a tag (class, primitive/constructed, number)
51 const uint8_t kTagNumberMask = 0x1F; 54 const uint8_t kTagNumberMask = 0x1F;
52 const uint8_t kTagConstructionMask = 0x20; 55 const uint8_t kTagConstructionMask = 0x20;
53 const uint8_t kTagClassMask = 0xC0; 56 const uint8_t kTagClassMask = 0xC0;
54 57
55 NET_EXPORT Tag ContextSpecificConstructed(uint8_t base); 58 NET_EXPORT Tag ContextSpecificConstructed(uint8_t base);
56 NET_EXPORT Tag ContextSpecificPrimitive(uint8_t base); 59 NET_EXPORT Tag ContextSpecificPrimitive(uint8_t base);
57 NET_EXPORT bool IsConstructed(Tag tag); 60 NET_EXPORT bool IsConstructed(Tag tag);
58 61
59 } // namespace der 62 } // namespace der
60 63
61 } // namespace net 64 } // namespace net
62 65
63 #endif // NET_DER_TAG_H_ 66 #endif // NET_DER_TAG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698