OLD | NEW |
1 /* This Source Code Form is subject to the terms of the Mozilla Public | 1 /* This Source Code Form is subject to the terms of the Mozilla Public |
2 * License, v. 2.0. If a copy of the MPL was not distributed with this | 2 * License, v. 2.0. If a copy of the MPL was not distributed with this |
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
4 | 4 |
5 #ifndef _SECDERT_H_ | 5 #ifndef _SECDERT_H_ |
6 #define _SECDERT_H_ | 6 #define _SECDERT_H_ |
7 /* | 7 /* |
8 * secdert.h - public data structures for the DER encoding and | 8 * secdert.h - public data structures for the DER encoding and |
9 * decoding utilities library | 9 * decoding utilities library |
10 * | |
11 * $Id$ | |
12 */ | 10 */ |
13 | 11 |
14 #include "utilrename.h" | 12 #include "utilrename.h" |
15 #include "seccomon.h" | 13 #include "seccomon.h" |
16 | 14 |
17 typedef struct DERTemplateStr DERTemplate; | 15 typedef struct DERTemplateStr DERTemplate; |
18 | 16 |
19 /* | 17 /* |
20 ** An array of these structures defines an encoding for an object using DER. | 18 ** An array of these structures defines an encoding for an object using DER. |
21 ** The array usually starts with a dummy entry whose kind is DER_SEQUENCE; | 19 ** The array usually starts with a dummy entry whose kind is DER_SEQUENCE; |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 /* | 120 /* |
123 ** Macro to convert der decoded bit string into a decoded octet | 121 ** Macro to convert der decoded bit string into a decoded octet |
124 ** string. All it needs to do is fiddle with the length code. | 122 ** string. All it needs to do is fiddle with the length code. |
125 */ | 123 */ |
126 #define DER_ConvertBitString(item) \ | 124 #define DER_ConvertBitString(item) \ |
127 { \ | 125 { \ |
128 (item)->len = ((item)->len + 7) >> 3; \ | 126 (item)->len = ((item)->len + 7) >> 3; \ |
129 } | 127 } |
130 | 128 |
131 #endif /* _SECDERT_H_ */ | 129 #endif /* _SECDERT_H_ */ |
OLD | NEW |