| OLD | NEW |
| 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 14 matching lines...) Expand all Loading... |
| 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 kUtcTime = 0x17; | 33 const Tag kUtcTime = 0x17; |
| 34 const Tag kGeneralizedTime = 0x18; | 34 const Tag kGeneralizedTime = 0x18; |
| 35 const Tag kUniversalString = 0x1C; |
| 36 const Tag kBmpString = 0x1E; |
| 35 | 37 |
| 36 // Universal class constructed types | 38 // Universal class constructed types |
| 37 const Tag kSequence = 0x30; | 39 const Tag kSequence = 0x30; |
| 38 const Tag kSet = 0x31; | 40 const Tag kSet = 0x31; |
| 39 | 41 |
| 40 // Primitive/constructed bits | 42 // Primitive/constructed bits |
| 41 const uint8_t kTagPrimitive = 0x00; | 43 const uint8_t kTagPrimitive = 0x00; |
| 42 const uint8_t kTagConstructed = 0x20; | 44 const uint8_t kTagConstructed = 0x20; |
| 43 | 45 |
| 44 // Tag classes | 46 // Tag classes |
| 45 const uint8_t kTagUniversal = 0x00; | 47 const uint8_t kTagUniversal = 0x00; |
| 46 const uint8_t kTagApplication = 0x40; | 48 const uint8_t kTagApplication = 0x40; |
| 47 const uint8_t kTagContextSpecific = 0x80; | 49 const uint8_t kTagContextSpecific = 0x80; |
| 48 const uint8_t kTagPrivate = 0xC0; | 50 const uint8_t kTagPrivate = 0xC0; |
| 49 | 51 |
| 50 // Masks for the 3 components of a tag (class, primitive/constructed, number) | 52 // Masks for the 3 components of a tag (class, primitive/constructed, number) |
| 51 const uint8_t kTagNumberMask = 0x1F; | 53 const uint8_t kTagNumberMask = 0x1F; |
| 52 const uint8_t kTagConstructionMask = 0x20; | 54 const uint8_t kTagConstructionMask = 0x20; |
| 53 const uint8_t kTagClassMask = 0xC0; | 55 const uint8_t kTagClassMask = 0xC0; |
| 54 | 56 |
| 55 NET_EXPORT Tag ContextSpecificConstructed(uint8_t base); | 57 NET_EXPORT Tag ContextSpecificConstructed(uint8_t base); |
| 56 NET_EXPORT Tag ContextSpecificPrimitive(uint8_t base); | 58 NET_EXPORT Tag ContextSpecificPrimitive(uint8_t base); |
| 57 NET_EXPORT bool IsConstructed(Tag tag); | 59 NET_EXPORT bool IsConstructed(Tag tag); |
| 58 | 60 |
| 59 } // namespace der | 61 } // namespace der |
| 60 | 62 |
| 61 } // namespace net | 63 } // namespace net |
| 62 | 64 |
| 63 #endif // NET_DER_TAG_H_ | 65 #endif // NET_DER_TAG_H_ |
| OLD | NEW |