| OLD | NEW |
| (Empty) |
| 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 | |
| 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | |
| 4 /* | |
| 5 * pkix_revocationmethod.h | |
| 6 * | |
| 7 * RevocationMethod Object | |
| 8 * | |
| 9 */ | |
| 10 | |
| 11 #ifndef _PKIX_REVOCATIONMETHOD_H | |
| 12 #define _PKIX_REVOCATIONMETHOD_H | |
| 13 | |
| 14 #include "pkixt.h" | |
| 15 #include "pkix_revocationchecker.h" | |
| 16 | |
| 17 #ifdef __cplusplus | |
| 18 extern "C" { | |
| 19 #endif | |
| 20 | |
| 21 typedef struct pkix_RevocationMethodStruct pkix_RevocationMethod; | |
| 22 | |
| 23 /* Local revocation check function prototype definition. | |
| 24 * Revocation methods capable of checking revocation though local | |
| 25 * means(cache) should implement this prototype. */ | |
| 26 typedef PKIX_Error * | |
| 27 pkix_LocalRevocationCheckFn(PKIX_PL_Cert *cert, PKIX_PL_Cert *issuer, | |
| 28 PKIX_PL_Date *date, | |
| 29 pkix_RevocationMethod *checkerObject, | |
| 30 PKIX_ProcessingParams *procParams, | |
| 31 PKIX_UInt32 methodFlags, | |
| 32 PKIX_Boolean chainVerificationState, | |
| 33 PKIX_RevocationStatus *pRevStatus, | |
| 34 PKIX_UInt32 *reasonCode, | |
| 35 void *plContext); | |
| 36 | |
| 37 /* External revocation check function prototype definition. | |
| 38 * Revocation methods that required external communications(crldp | |
| 39 * ocsp) shoult implement this prototype. */ | |
| 40 typedef PKIX_Error * | |
| 41 pkix_ExternalRevocationCheckFn(PKIX_PL_Cert *cert, PKIX_PL_Cert *issuer, | |
| 42 PKIX_PL_Date *date, | |
| 43 pkix_RevocationMethod *checkerObject, | |
| 44 PKIX_ProcessingParams *procParams, | |
| 45 PKIX_UInt32 methodFlags, | |
| 46 PKIX_RevocationStatus *pRevStatus, | |
| 47 PKIX_UInt32 *reasonCode, | |
| 48 void **pNBIOContext, void *plContext); | |
| 49 | |
| 50 /* Revocation method structure assosiates revocation types with | |
| 51 * a set of flags on the method, a priority of the method, and | |
| 52 * method local/external checker functions. */ | |
| 53 struct pkix_RevocationMethodStruct { | |
| 54 PKIX_RevocationMethodType methodType; | |
| 55 PKIX_UInt32 flags; | |
| 56 PKIX_UInt32 priority; | |
| 57 pkix_LocalRevocationCheckFn (*localRevChecker); | |
| 58 pkix_ExternalRevocationCheckFn (*externalRevChecker); | |
| 59 }; | |
| 60 | |
| 61 PKIX_Error * | |
| 62 pkix_RevocationMethod_Duplicate(PKIX_PL_Object *object, | |
| 63 PKIX_PL_Object *newObject, | |
| 64 void *plContext); | |
| 65 | |
| 66 PKIX_Error * | |
| 67 pkix_RevocationMethod_Init(pkix_RevocationMethod *method, | |
| 68 PKIX_RevocationMethodType methodType, | |
| 69 PKIX_UInt32 flags, | |
| 70 PKIX_UInt32 priority, | |
| 71 pkix_LocalRevocationCheckFn localRevChecker, | |
| 72 pkix_ExternalRevocationCheckFn externalRevChecker, | |
| 73 void *plContext); | |
| 74 | |
| 75 | |
| 76 #ifdef __cplusplus | |
| 77 } | |
| 78 #endif | |
| 79 | |
| 80 #endif /* _PKIX_REVOCATIONMETHOD_H */ | |
| OLD | NEW |