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_ekuchecker.h andre@0: * andre@0: * User Defined Object Type Extended Key Usage Definition andre@0: * andre@0: */ andre@0: andre@0: #ifndef _PKIX_EKUCHECKER_H andre@0: #define _PKIX_EKUCHECKER_H andre@0: andre@0: #include "pkix_pl_common.h" andre@0: andre@0: #ifdef __cplusplus andre@0: extern "C" { andre@0: #endif andre@0: andre@0: /* andre@0: * FUNCTION: PKIX_PL_EkuChecker_Create andre@0: * andre@0: * DESCRIPTION: andre@0: * Create a CertChainChecker with EkuCheckerState and add it into andre@0: * PKIX_ProcessingParams object. andre@0: * andre@0: * PARAMETERS andre@0: * "params" andre@0: * a PKIX_ProcessingParams links to PKIX_ComCertSelParams where a list of andre@0: * Extended Key Usage OIDs specified by application can be retrieved for andre@0: * verification. andre@0: * "ekuChecker" andre@0: * Address of created ekuchecker. andre@0: * "plContext" andre@0: * Platform-specific context pointer. andre@0: * andre@0: * THREAD SAFETY: andre@0: * Thread Safe (see Thread Safety Definitions in Programmer's Guide) andre@0: * andre@0: * RETURNS: andre@0: * Returns NULL if the function succeeds. andre@0: * Returns a UserDefinedModules Error if the function fails in a non-fatal andre@0: * way. andre@0: * Returns a Fatal Error andre@0: */ andre@0: PKIX_Error * andre@0: PKIX_EkuChecker_Create( andre@0: PKIX_ProcessingParams *params, andre@0: PKIX_CertChainChecker **ekuChecker, andre@0: void *plContext); andre@0: andre@0: /* andre@0: * FUNCTION: PKIX_PL_EkuChecker_GetRequiredEku andre@0: * andre@0: * DESCRIPTION: andre@0: * This function retrieves application specified ExtenedKeyUsage(s) from andre@0: * ComCertSetparams and converts its OID representations to SECCertUsageEnum. andre@0: * The result is stored and returned in bit mask at "pRequiredExtKeyUsage". andre@0: * andre@0: * PARAMETERS andre@0: * "certSelector" andre@0: * a PKIX_CertSelector links to PKIX_ComCertSelParams where a list of andre@0: * Extended Key Usage OIDs specified by application can be retrieved for andre@0: * verification. Must be non-NULL. andre@0: * "pRequiredExtKeyUsage" andre@0: * Address where the result is returned. Must be non-NULL. andre@0: * "plContext" andre@0: * Platform-specific context pointer. andre@0: * andre@0: * THREAD SAFETY: andre@0: * Thread Safe (see Thread Safety Definitions in Programmer's Guide) andre@0: * andre@0: * RETURNS: andre@0: * Returns NULL if the function succeeds. andre@0: * Returns a UserDefinedModules Error if the function fails in a non-fatal andre@0: * way. andre@0: * Returns a Fatal Error andre@0: */ andre@0: PKIX_Error * andre@0: pkix_EkuChecker_GetRequiredEku( andre@0: PKIX_CertSelector *certSelector, andre@0: PKIX_UInt32 *pRequiredExtKeyUsage, andre@0: void *plContext); andre@0: andre@0: /* see source file for function documentation */ andre@0: PKIX_Error *pkix_EkuChecker_RegisterSelf(void *plContext); andre@0: andre@0: #ifdef __cplusplus andre@0: } andre@0: #endif andre@0: andre@0: #endif /* _PKIX_PL_EKUCHECKER_H */