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 _SECDER_H_ | 5 #ifndef _SECDER_H_ |
6 #define _SECDER_H_ | 6 #define _SECDER_H_ |
7 | 7 |
8 #include "utilrename.h" | 8 #include "utilrename.h" |
9 | 9 |
10 /* | 10 /* |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 ** "utctime" is the DER encoded UTC time to be converted. | 120 ** "utctime" is the DER encoded UTC time to be converted. |
121 ** The caller is responsible for deallocating the returned buffer. | 121 ** The caller is responsible for deallocating the returned buffer. |
122 */ | 122 */ |
123 extern char *DER_UTCDayToAscii(SECItem *utctime); | 123 extern char *DER_UTCDayToAscii(SECItem *utctime); |
124 /* same thing for DER encoded GeneralizedTime */ | 124 /* same thing for DER encoded GeneralizedTime */ |
125 extern char *DER_GeneralizedDayToAscii(SECItem *gentime); | 125 extern char *DER_GeneralizedDayToAscii(SECItem *gentime); |
126 /* same thing for either DER UTCTime or GeneralizedTime */ | 126 /* same thing for either DER UTCTime or GeneralizedTime */ |
127 extern char *DER_TimeChoiceDayToAscii(SECItem *timechoice); | 127 extern char *DER_TimeChoiceDayToAscii(SECItem *timechoice); |
128 | 128 |
129 /* | 129 /* |
130 ** Convert a PRTime time to a DER encoded Generalized time | 130 ** Convert a PRTime to a DER encoded Generalized time |
131 ** gmttime must be on or after January 1, year 1 and | 131 ** gmttime must be on or after January 1, year 1 and |
132 ** before January 1, 10000. | 132 ** before January 1, 10000. |
133 */ | 133 */ |
134 extern SECStatus DER_TimeToGeneralizedTime(SECItem *dst, PRTime gmttime); | 134 extern SECStatus DER_TimeToGeneralizedTime(SECItem *dst, PRTime gmttime); |
135 extern SECStatus DER_TimeToGeneralizedTimeArena(PLArenaPool* arenaOpt, | 135 extern SECStatus DER_TimeToGeneralizedTimeArena(PLArenaPool* arenaOpt, |
136 SECItem *dst, PRTime gmttime); | 136 SECItem *dst, PRTime gmttime); |
137 | 137 |
138 /* | 138 /* |
139 ** Convert a DER encoded Generalized time value into an NSPR time value. | 139 ** Convert a DER encoded Generalized time value into an NSPR time value. |
140 ** "dst" the resulting NSPR time | 140 ** "dst" the resulting NSPR time |
(...skipping 24 matching lines...) Expand all Loading... |
165 /* encode a PRTime to an ASN.1 DER SECItem containing either a | 165 /* encode a PRTime to an ASN.1 DER SECItem containing either a |
166 SEC_ASN1_GENERALIZED_TIME or a SEC_ASN1_UTC_TIME */ | 166 SEC_ASN1_GENERALIZED_TIME or a SEC_ASN1_UTC_TIME */ |
167 | 167 |
168 extern SECStatus DER_EncodeTimeChoice(PLArenaPool* arena, SECItem* output, | 168 extern SECStatus DER_EncodeTimeChoice(PLArenaPool* arena, SECItem* output, |
169 PRTime input); | 169 PRTime input); |
170 | 170 |
171 SEC_END_PROTOS | 171 SEC_END_PROTOS |
172 | 172 |
173 #endif /* _SECDER_H_ */ | 173 #endif /* _SECDER_H_ */ |
174 | 174 |
OLD | NEW |