michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: /* michael@0: * pkix_revocationmethod.h michael@0: * michael@0: * RevocationMethod Object michael@0: * michael@0: */ michael@0: michael@0: #ifndef _PKIX_REVOCATIONMETHOD_H michael@0: #define _PKIX_REVOCATIONMETHOD_H michael@0: michael@0: #include "pkixt.h" michael@0: #include "pkix_revocationchecker.h" michael@0: michael@0: #ifdef __cplusplus michael@0: extern "C" { michael@0: #endif michael@0: michael@0: typedef struct pkix_RevocationMethodStruct pkix_RevocationMethod; michael@0: michael@0: /* Local revocation check function prototype definition. michael@0: * Revocation methods capable of checking revocation though local michael@0: * means(cache) should implement this prototype. */ michael@0: typedef PKIX_Error * michael@0: pkix_LocalRevocationCheckFn(PKIX_PL_Cert *cert, PKIX_PL_Cert *issuer, michael@0: PKIX_PL_Date *date, michael@0: pkix_RevocationMethod *checkerObject, michael@0: PKIX_ProcessingParams *procParams, michael@0: PKIX_UInt32 methodFlags, michael@0: PKIX_Boolean chainVerificationState, michael@0: PKIX_RevocationStatus *pRevStatus, michael@0: PKIX_UInt32 *reasonCode, michael@0: void *plContext); michael@0: michael@0: /* External revocation check function prototype definition. michael@0: * Revocation methods that required external communications(crldp michael@0: * ocsp) shoult implement this prototype. */ michael@0: typedef PKIX_Error * michael@0: pkix_ExternalRevocationCheckFn(PKIX_PL_Cert *cert, PKIX_PL_Cert *issuer, michael@0: PKIX_PL_Date *date, michael@0: pkix_RevocationMethod *checkerObject, michael@0: PKIX_ProcessingParams *procParams, michael@0: PKIX_UInt32 methodFlags, michael@0: PKIX_RevocationStatus *pRevStatus, michael@0: PKIX_UInt32 *reasonCode, michael@0: void **pNBIOContext, void *plContext); michael@0: michael@0: /* Revocation method structure assosiates revocation types with michael@0: * a set of flags on the method, a priority of the method, and michael@0: * method local/external checker functions. */ michael@0: struct pkix_RevocationMethodStruct { michael@0: PKIX_RevocationMethodType methodType; michael@0: PKIX_UInt32 flags; michael@0: PKIX_UInt32 priority; michael@0: pkix_LocalRevocationCheckFn (*localRevChecker); michael@0: pkix_ExternalRevocationCheckFn (*externalRevChecker); michael@0: }; michael@0: michael@0: PKIX_Error * michael@0: pkix_RevocationMethod_Duplicate(PKIX_PL_Object *object, michael@0: PKIX_PL_Object *newObject, michael@0: void *plContext); michael@0: michael@0: PKIX_Error * michael@0: pkix_RevocationMethod_Init(pkix_RevocationMethod *method, michael@0: PKIX_RevocationMethodType methodType, michael@0: PKIX_UInt32 flags, michael@0: PKIX_UInt32 priority, michael@0: pkix_LocalRevocationCheckFn localRevChecker, michael@0: pkix_ExternalRevocationCheckFn externalRevChecker, michael@0: void *plContext); michael@0: michael@0: michael@0: #ifdef __cplusplus michael@0: } michael@0: #endif michael@0: michael@0: #endif /* _PKIX_REVOCATIONMETHOD_H */