security/nss/lib/libpkix/pkix/checker/pkix_revocationmethod.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

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

mercurial