security/nss/lib/libpkix/pkix/checker/pkix_ekuchecker.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

     1 /* This Source Code Form is subject to the terms of the Mozilla Public
     2  * License, v. 2.0. If a copy of the MPL was not distributed with this
     3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     4 /*
     5  * pkix_ekuchecker.h
     6  *
     7  * User Defined Object Type Extended Key Usage Definition
     8  *
     9  */
    11 #ifndef _PKIX_EKUCHECKER_H
    12 #define _PKIX_EKUCHECKER_H
    14 #include "pkix_pl_common.h"
    16 #ifdef __cplusplus
    17 extern "C" {
    18 #endif
    20 /*
    21  * FUNCTION: PKIX_PL_EkuChecker_Create
    22  *
    23  * DESCRIPTION:
    24  *  Create a CertChainChecker with EkuCheckerState and add it into
    25  *  PKIX_ProcessingParams object.
    26  *
    27  * PARAMETERS
    28  *  "params"
    29  *      a PKIX_ProcessingParams links to PKIX_ComCertSelParams where a list of
    30  *      Extended Key Usage OIDs specified by application can be retrieved for
    31  *      verification.
    32  *  "ekuChecker" 
    33  *      Address of created ekuchecker.
    34  *  "plContext"
    35  *      Platform-specific context pointer.
    36  *
    37  * THREAD SAFETY:
    38  *  Thread Safe (see Thread Safety Definitions in Programmer's Guide)
    39  *
    40  * RETURNS:
    41  *  Returns NULL if the function succeeds.
    42  *  Returns a UserDefinedModules Error if the function fails in a non-fatal
    43  *  way.
    44  *  Returns a Fatal Error
    45  */
    46 PKIX_Error *
    47 PKIX_EkuChecker_Create(
    48         PKIX_ProcessingParams *params,
    49         PKIX_CertChainChecker **ekuChecker,
    50         void *plContext);
    52 /*
    53  * FUNCTION: PKIX_PL_EkuChecker_GetRequiredEku
    54  *
    55  * DESCRIPTION:
    56  *  This function retrieves application specified ExtenedKeyUsage(s) from
    57  *  ComCertSetparams and converts its OID representations to SECCertUsageEnum.
    58  *  The result is stored and returned in bit mask at "pRequiredExtKeyUsage".
    59  *
    60  * PARAMETERS
    61  *  "certSelector"
    62  *      a PKIX_CertSelector links to PKIX_ComCertSelParams where a list of
    63  *      Extended Key Usage OIDs specified by application can be retrieved for
    64  *      verification. Must be non-NULL.
    65  *  "pRequiredExtKeyUsage"
    66  *      Address where the result is returned. Must be non-NULL.
    67  *  "plContext"
    68  *      Platform-specific context pointer.
    69  *
    70  * THREAD SAFETY:
    71  *  Thread Safe (see Thread Safety Definitions in Programmer's Guide)
    72  *
    73  * RETURNS:
    74  *  Returns NULL if the function succeeds.
    75  *  Returns a UserDefinedModules Error if the function fails in a non-fatal
    76  *  way.
    77  *  Returns a Fatal Error
    78  */
    79 PKIX_Error *
    80 pkix_EkuChecker_GetRequiredEku(
    81         PKIX_CertSelector *certSelector,
    82         PKIX_UInt32 *pRequiredExtKeyUsage,
    83         void *plContext);
    85 /* see source file for function documentation */
    86 PKIX_Error *pkix_EkuChecker_RegisterSelf(void *plContext);
    88 #ifdef __cplusplus
    89 }
    90 #endif
    92 #endif /* _PKIX_PL_EKUCHECKER_H */

mercurial