| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 ** Store a der encoded *unsigned* integer (whose value is "src") into "dst". | 66 ** Store a der encoded *unsigned* integer (whose value is "src") into "dst". |
| 67 ** XXX This should really be enhanced to take an unsigned long. | 67 ** XXX This should really be enhanced to take an unsigned long. |
| 68 */ | 68 */ |
| 69 extern SECStatus DER_SetUInteger(PLArenaPool *arena, SECItem *dst, PRUint32 src)
; | 69 extern SECStatus DER_SetUInteger(PLArenaPool *arena, SECItem *dst, PRUint32 src)
; |
| 70 | 70 |
| 71 /* | 71 /* |
| 72 ** Decode a der encoded *signed* integer that is stored in "src". | 72 ** Decode a der encoded *signed* integer that is stored in "src". |
| 73 ** If "-1" is returned, then the caller should check the error in | 73 ** If "-1" is returned, then the caller should check the error in |
| 74 ** XP_GetError() to see if an overflow occurred (SEC_ERROR_BAD_DER). | 74 ** XP_GetError() to see if an overflow occurred (SEC_ERROR_BAD_DER). |
| 75 */ | 75 */ |
| 76 extern long DER_GetInteger(SECItem *src); | 76 extern long DER_GetInteger(const SECItem *src); |
| 77 | 77 |
| 78 /* | 78 /* |
| 79 ** Decode a der encoded *unsigned* integer that is stored in "src". | 79 ** Decode a der encoded *unsigned* integer that is stored in "src". |
| 80 ** If the ULONG_MAX is returned, then the caller should check the error | 80 ** If the ULONG_MAX is returned, then the caller should check the error |
| 81 ** in XP_GetError() to see if an overflow occurred (SEC_ERROR_BAD_DER). | 81 ** in XP_GetError() to see if an overflow occurred (SEC_ERROR_BAD_DER). |
| 82 */ | 82 */ |
| 83 extern unsigned long DER_GetUInteger(SECItem *src); | 83 extern unsigned long DER_GetUInteger(SECItem *src); |
| 84 | 84 |
| 85 /* | 85 /* |
| 86 ** Convert an NSPR time value to a der encoded time value. | 86 ** Convert an NSPR time value to a der encoded time value. |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 /* encode a PRTime to an ASN.1 DER SECItem containing either a | 167 /* encode a PRTime to an ASN.1 DER SECItem containing either a |
| 168 SEC_ASN1_GENERALIZED_TIME or a SEC_ASN1_UTC_TIME */ | 168 SEC_ASN1_GENERALIZED_TIME or a SEC_ASN1_UTC_TIME */ |
| 169 | 169 |
| 170 extern SECStatus DER_EncodeTimeChoice(PLArenaPool* arena, SECItem* output, | 170 extern SECStatus DER_EncodeTimeChoice(PLArenaPool* arena, SECItem* output, |
| 171 PRTime input); | 171 PRTime input); |
| 172 | 172 |
| 173 SEC_END_PROTOS | 173 SEC_END_PROTOS |
| 174 | 174 |
| 175 #endif /* _SECDER_H_ */ | 175 #endif /* _SECDER_H_ */ |
| 176 | 176 |
| OLD | NEW |