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