OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_BASE_ASN1_UTIL_H_ | 5 #ifndef NET_BASE_ASN1_UTIL_H_ |
6 #define NET_BASE_ASN1_UTIL_H_ | 6 #define NET_BASE_ASN1_UTIL_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/string_piece.h" | 10 #include "base/string_piece.h" |
11 #include "net/base/net_export.h" | 11 #include "net/base/net_export.h" |
12 | 12 |
13 namespace net { | 13 namespace net { |
14 | 14 |
15 namespace asn1 { | 15 namespace asn1 { |
16 | 16 |
17 // These are the DER encodings of the tag byte for ASN.1 objects. | 17 // These are the DER encodings of the tag byte for ASN.1 objects. |
18 static const unsigned kBOOLEAN = 0x01; | 18 static const unsigned kBOOLEAN = 0x01; |
19 static const unsigned kINTEGER = 0x02; | 19 static const unsigned kINTEGER = 0x02; |
| 20 static const unsigned kBITSTRING = 0x03; |
20 static const unsigned kOCTETSTRING = 0x04; | 21 static const unsigned kOCTETSTRING = 0x04; |
21 static const unsigned kOID = 0x06; | 22 static const unsigned kOID = 0x06; |
22 static const unsigned kSEQUENCE = 0x30; | 23 static const unsigned kSEQUENCE = 0x30; |
23 | 24 |
24 // These are flags that can be ORed with the above tag numbers. | 25 // These are flags that can be ORed with the above tag numbers. |
25 static const unsigned kContextSpecific = 0x80; | 26 static const unsigned kContextSpecific = 0x80; |
26 static const unsigned kConstructed = 0x20; | 27 static const unsigned kConstructed = 0x20; |
27 | 28 |
28 // kAny matches any tag value; | 29 // kAny matches any tag value; |
29 static const unsigned kAny = 0x10000; | 30 static const unsigned kAny = 0x10000; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 // several locations as far as a CRL filter is concerned. | 77 // several locations as far as a CRL filter is concerned. |
77 NET_EXPORT_PRIVATE bool ExtractCRLURLsFromDERCert( | 78 NET_EXPORT_PRIVATE bool ExtractCRLURLsFromDERCert( |
78 base::StringPiece cert, | 79 base::StringPiece cert, |
79 std::vector<base::StringPiece>* urls_out); | 80 std::vector<base::StringPiece>* urls_out); |
80 | 81 |
81 } // namespace asn1 | 82 } // namespace asn1 |
82 | 83 |
83 } // namespace net | 84 } // namespace net |
84 | 85 |
85 #endif // NET_BASE_ASN1_UTIL_H_ | 86 #endif // NET_BASE_ASN1_UTIL_H_ |
OLD | NEW |