security/nss/lib/libpkix/pkix/checker/pkix_ekuchecker.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_ekuchecker.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,92 @@
     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_ekuchecker.h
     1.9 + *
    1.10 + * User Defined Object Type Extended Key Usage Definition
    1.11 + *
    1.12 + */
    1.13 +
    1.14 +#ifndef _PKIX_EKUCHECKER_H
    1.15 +#define _PKIX_EKUCHECKER_H
    1.16 +
    1.17 +#include "pkix_pl_common.h"
    1.18 +
    1.19 +#ifdef __cplusplus
    1.20 +extern "C" {
    1.21 +#endif
    1.22 +
    1.23 +/*
    1.24 + * FUNCTION: PKIX_PL_EkuChecker_Create
    1.25 + *
    1.26 + * DESCRIPTION:
    1.27 + *  Create a CertChainChecker with EkuCheckerState and add it into
    1.28 + *  PKIX_ProcessingParams object.
    1.29 + *
    1.30 + * PARAMETERS
    1.31 + *  "params"
    1.32 + *      a PKIX_ProcessingParams links to PKIX_ComCertSelParams where a list of
    1.33 + *      Extended Key Usage OIDs specified by application can be retrieved for
    1.34 + *      verification.
    1.35 + *  "ekuChecker" 
    1.36 + *      Address of created ekuchecker.
    1.37 + *  "plContext"
    1.38 + *      Platform-specific context pointer.
    1.39 + *
    1.40 + * THREAD SAFETY:
    1.41 + *  Thread Safe (see Thread Safety Definitions in Programmer's Guide)
    1.42 + *
    1.43 + * RETURNS:
    1.44 + *  Returns NULL if the function succeeds.
    1.45 + *  Returns a UserDefinedModules Error if the function fails in a non-fatal
    1.46 + *  way.
    1.47 + *  Returns a Fatal Error
    1.48 + */
    1.49 +PKIX_Error *
    1.50 +PKIX_EkuChecker_Create(
    1.51 +        PKIX_ProcessingParams *params,
    1.52 +        PKIX_CertChainChecker **ekuChecker,
    1.53 +        void *plContext);
    1.54 +
    1.55 +/*
    1.56 + * FUNCTION: PKIX_PL_EkuChecker_GetRequiredEku
    1.57 + *
    1.58 + * DESCRIPTION:
    1.59 + *  This function retrieves application specified ExtenedKeyUsage(s) from
    1.60 + *  ComCertSetparams and converts its OID representations to SECCertUsageEnum.
    1.61 + *  The result is stored and returned in bit mask at "pRequiredExtKeyUsage".
    1.62 + *
    1.63 + * PARAMETERS
    1.64 + *  "certSelector"
    1.65 + *      a PKIX_CertSelector links to PKIX_ComCertSelParams where a list of
    1.66 + *      Extended Key Usage OIDs specified by application can be retrieved for
    1.67 + *      verification. Must be non-NULL.
    1.68 + *  "pRequiredExtKeyUsage"
    1.69 + *      Address where the result is returned. Must be non-NULL.
    1.70 + *  "plContext"
    1.71 + *      Platform-specific context pointer.
    1.72 + *
    1.73 + * THREAD SAFETY:
    1.74 + *  Thread Safe (see Thread Safety Definitions in Programmer's Guide)
    1.75 + *
    1.76 + * RETURNS:
    1.77 + *  Returns NULL if the function succeeds.
    1.78 + *  Returns a UserDefinedModules Error if the function fails in a non-fatal
    1.79 + *  way.
    1.80 + *  Returns a Fatal Error
    1.81 + */
    1.82 +PKIX_Error *
    1.83 +pkix_EkuChecker_GetRequiredEku(
    1.84 +        PKIX_CertSelector *certSelector,
    1.85 +        PKIX_UInt32 *pRequiredExtKeyUsage,
    1.86 +        void *plContext);
    1.87 +
    1.88 +/* see source file for function documentation */
    1.89 +PKIX_Error *pkix_EkuChecker_RegisterSelf(void *plContext);
    1.90 +
    1.91 +#ifdef __cplusplus
    1.92 +}
    1.93 +#endif
    1.94 +
    1.95 +#endif /* _PKIX_PL_EKUCHECKER_H */

mercurial