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 * pkix_signaturechecker.h | 5 * pkix_signaturechecker.h |
6 * | 6 * |
7 * Header file for validate signature function | 7 * Header file for validate signature function |
8 * | 8 * |
9 */ | 9 */ |
10 | 10 |
11 #ifndef _PKIX_SIGNATURECHECKER_H | 11 #ifndef _PKIX_SIGNATURECHECKER_H |
12 #define _PKIX_SIGNATURECHECKER_H | 12 #define _PKIX_SIGNATURECHECKER_H |
13 | 13 |
14 #include "pkix_tools.h" | 14 #include "pkix_tools.h" |
15 | 15 |
16 #ifdef __cplusplus | 16 #ifdef __cplusplus |
17 extern "C" { | 17 extern "C" { |
18 #endif | 18 #endif |
19 | 19 |
20 typedef struct pkix_SignatureCheckerState pkix_SignatureCheckerState; | 20 typedef struct pkix_SignatureCheckerState pkix_SignatureCheckerState; |
21 | 21 |
22 struct pkix_SignatureCheckerState { | 22 struct pkix_SignatureCheckerState { |
23 PKIX_Boolean prevCertCertSign; | 23 PKIX_Boolean prevCertCertSign; |
24 PKIX_UInt32 certsRemaining; | 24 PKIX_UInt32 certsRemaining; |
25 PKIX_PL_PublicKey *prevPublicKey; /* Subject PubKey of last cert */ | 25 PKIX_PL_PublicKey *prevPublicKey; /* Subject PubKey of last cert */ |
26 PKIX_List *prevPublicKeyList; /* of PKIX_PL_PublicKey */ | 26 PKIX_List *prevPublicKeyList; /* of PKIX_PL_PublicKey */ |
27 PKIX_PL_OID *keyUsageOID; | 27 PKIX_PL_OID *keyUsageOID; |
28 }; | 28 }; |
29 | 29 |
30 PKIX_Error * | 30 PKIX_Error *pkix_SignatureChecker_Initialize(PKIX_PL_PublicKey *trustedPubKey, |
31 pkix_SignatureChecker_Initialize( | 31 PKIX_UInt32 certsRemaining, |
32 PKIX_PL_PublicKey *trustedPubKey, | 32 PKIX_CertChainChecker **pChecker, |
33 PKIX_UInt32 certsRemaining, | 33 void *plContext); |
34 PKIX_CertChainChecker **pChecker, | |
35 void *plContext); | |
36 | 34 |
37 PKIX_Error * | 35 PKIX_Error *pkix_SignatureCheckerState_RegisterSelf(void *plContext); |
38 pkix_SignatureCheckerState_RegisterSelf(void *plContext); | |
39 | 36 |
40 #ifdef __cplusplus | 37 #ifdef __cplusplus |
41 } | 38 } |
42 #endif | 39 #endif |
43 | 40 |
44 #endif /* _PKIX_SIGNATURECHECKER_H */ | 41 #endif /* _PKIX_SIGNATURECHECKER_H */ |
OLD | NEW |