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

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/security/nss/lib/libpkix/pkix/checker/pkix_revocationmethod.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,80 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +/*
     1.8 + * pkix_revocationmethod.h
     1.9 + *
    1.10 + * RevocationMethod Object
    1.11 + *
    1.12 + */
    1.13 +
    1.14 +#ifndef _PKIX_REVOCATIONMETHOD_H
    1.15 +#define _PKIX_REVOCATIONMETHOD_H
    1.16 +
    1.17 +#include "pkixt.h"
    1.18 +#include "pkix_revocationchecker.h"
    1.19 +
    1.20 +#ifdef __cplusplus
    1.21 +extern "C" {
    1.22 +#endif
    1.23 +
    1.24 +typedef struct pkix_RevocationMethodStruct pkix_RevocationMethod;
    1.25 +
    1.26 +/* Local revocation check function prototype definition.
    1.27 + * Revocation methods capable of checking revocation though local
    1.28 + * means(cache) should implement this prototype. */
    1.29 +typedef PKIX_Error *
    1.30 +pkix_LocalRevocationCheckFn(PKIX_PL_Cert *cert, PKIX_PL_Cert *issuer,
    1.31 +                            PKIX_PL_Date *date, 
    1.32 +                            pkix_RevocationMethod *checkerObject,
    1.33 +                            PKIX_ProcessingParams *procParams,
    1.34 +                            PKIX_UInt32 methodFlags,
    1.35 +                            PKIX_Boolean chainVerificationState,
    1.36 +                            PKIX_RevocationStatus *pRevStatus,
    1.37 +                            PKIX_UInt32 *reasonCode,
    1.38 +                            void *plContext);
    1.39 +
    1.40 +/* External revocation check function prototype definition.
    1.41 + * Revocation methods that required external communications(crldp
    1.42 + * ocsp) shoult implement this prototype. */
    1.43 +typedef PKIX_Error *
    1.44 +pkix_ExternalRevocationCheckFn(PKIX_PL_Cert *cert, PKIX_PL_Cert *issuer,
    1.45 +                               PKIX_PL_Date *date,
    1.46 +                               pkix_RevocationMethod *checkerObject,
    1.47 +                               PKIX_ProcessingParams *procParams,
    1.48 +                               PKIX_UInt32 methodFlags,
    1.49 +                               PKIX_RevocationStatus *pRevStatus,
    1.50 +                               PKIX_UInt32 *reasonCode,
    1.51 +                               void **pNBIOContext, void *plContext);
    1.52 +
    1.53 +/* Revocation method structure assosiates revocation types with
    1.54 + * a set of flags on the method, a priority of the method, and
    1.55 + * method local/external checker functions. */
    1.56 +struct pkix_RevocationMethodStruct {
    1.57 +    PKIX_RevocationMethodType methodType;
    1.58 +    PKIX_UInt32 flags;
    1.59 +    PKIX_UInt32 priority;
    1.60 +    pkix_LocalRevocationCheckFn (*localRevChecker);
    1.61 +    pkix_ExternalRevocationCheckFn (*externalRevChecker);
    1.62 +};
    1.63 +
    1.64 +PKIX_Error *
    1.65 +pkix_RevocationMethod_Duplicate(PKIX_PL_Object *object,
    1.66 +                                PKIX_PL_Object *newObject,
    1.67 +                                void *plContext);
    1.68 +
    1.69 +PKIX_Error *
    1.70 +pkix_RevocationMethod_Init(pkix_RevocationMethod *method,
    1.71 +                           PKIX_RevocationMethodType methodType,
    1.72 +                           PKIX_UInt32 flags,
    1.73 +                           PKIX_UInt32 priority,
    1.74 +                           pkix_LocalRevocationCheckFn localRevChecker,
    1.75 +                           pkix_ExternalRevocationCheckFn externalRevChecker,
    1.76 +                           void *plContext);
    1.77 +
    1.78 +
    1.79 +#ifdef __cplusplus
    1.80 +}
    1.81 +#endif
    1.82 +
    1.83 +#endif /* _PKIX_REVOCATIONMETHOD_H */

mercurial