Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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_ekuchecker.h |
michael@0 | 6 | * |
michael@0 | 7 | * User Defined Object Type Extended Key Usage Definition |
michael@0 | 8 | * |
michael@0 | 9 | */ |
michael@0 | 10 | |
michael@0 | 11 | #ifndef _PKIX_EKUCHECKER_H |
michael@0 | 12 | #define _PKIX_EKUCHECKER_H |
michael@0 | 13 | |
michael@0 | 14 | #include "pkix_pl_common.h" |
michael@0 | 15 | |
michael@0 | 16 | #ifdef __cplusplus |
michael@0 | 17 | extern "C" { |
michael@0 | 18 | #endif |
michael@0 | 19 | |
michael@0 | 20 | /* |
michael@0 | 21 | * FUNCTION: PKIX_PL_EkuChecker_Create |
michael@0 | 22 | * |
michael@0 | 23 | * DESCRIPTION: |
michael@0 | 24 | * Create a CertChainChecker with EkuCheckerState and add it into |
michael@0 | 25 | * PKIX_ProcessingParams object. |
michael@0 | 26 | * |
michael@0 | 27 | * PARAMETERS |
michael@0 | 28 | * "params" |
michael@0 | 29 | * a PKIX_ProcessingParams links to PKIX_ComCertSelParams where a list of |
michael@0 | 30 | * Extended Key Usage OIDs specified by application can be retrieved for |
michael@0 | 31 | * verification. |
michael@0 | 32 | * "ekuChecker" |
michael@0 | 33 | * Address of created ekuchecker. |
michael@0 | 34 | * "plContext" |
michael@0 | 35 | * Platform-specific context pointer. |
michael@0 | 36 | * |
michael@0 | 37 | * THREAD SAFETY: |
michael@0 | 38 | * Thread Safe (see Thread Safety Definitions in Programmer's Guide) |
michael@0 | 39 | * |
michael@0 | 40 | * RETURNS: |
michael@0 | 41 | * Returns NULL if the function succeeds. |
michael@0 | 42 | * Returns a UserDefinedModules Error if the function fails in a non-fatal |
michael@0 | 43 | * way. |
michael@0 | 44 | * Returns a Fatal Error |
michael@0 | 45 | */ |
michael@0 | 46 | PKIX_Error * |
michael@0 | 47 | PKIX_EkuChecker_Create( |
michael@0 | 48 | PKIX_ProcessingParams *params, |
michael@0 | 49 | PKIX_CertChainChecker **ekuChecker, |
michael@0 | 50 | void *plContext); |
michael@0 | 51 | |
michael@0 | 52 | /* |
michael@0 | 53 | * FUNCTION: PKIX_PL_EkuChecker_GetRequiredEku |
michael@0 | 54 | * |
michael@0 | 55 | * DESCRIPTION: |
michael@0 | 56 | * This function retrieves application specified ExtenedKeyUsage(s) from |
michael@0 | 57 | * ComCertSetparams and converts its OID representations to SECCertUsageEnum. |
michael@0 | 58 | * The result is stored and returned in bit mask at "pRequiredExtKeyUsage". |
michael@0 | 59 | * |
michael@0 | 60 | * PARAMETERS |
michael@0 | 61 | * "certSelector" |
michael@0 | 62 | * a PKIX_CertSelector links to PKIX_ComCertSelParams where a list of |
michael@0 | 63 | * Extended Key Usage OIDs specified by application can be retrieved for |
michael@0 | 64 | * verification. Must be non-NULL. |
michael@0 | 65 | * "pRequiredExtKeyUsage" |
michael@0 | 66 | * Address where the result is returned. Must be non-NULL. |
michael@0 | 67 | * "plContext" |
michael@0 | 68 | * Platform-specific context pointer. |
michael@0 | 69 | * |
michael@0 | 70 | * THREAD SAFETY: |
michael@0 | 71 | * Thread Safe (see Thread Safety Definitions in Programmer's Guide) |
michael@0 | 72 | * |
michael@0 | 73 | * RETURNS: |
michael@0 | 74 | * Returns NULL if the function succeeds. |
michael@0 | 75 | * Returns a UserDefinedModules Error if the function fails in a non-fatal |
michael@0 | 76 | * way. |
michael@0 | 77 | * Returns a Fatal Error |
michael@0 | 78 | */ |
michael@0 | 79 | PKIX_Error * |
michael@0 | 80 | pkix_EkuChecker_GetRequiredEku( |
michael@0 | 81 | PKIX_CertSelector *certSelector, |
michael@0 | 82 | PKIX_UInt32 *pRequiredExtKeyUsage, |
michael@0 | 83 | void *plContext); |
michael@0 | 84 | |
michael@0 | 85 | /* see source file for function documentation */ |
michael@0 | 86 | PKIX_Error *pkix_EkuChecker_RegisterSelf(void *plContext); |
michael@0 | 87 | |
michael@0 | 88 | #ifdef __cplusplus |
michael@0 | 89 | } |
michael@0 | 90 | #endif |
michael@0 | 91 | |
michael@0 | 92 | #endif /* _PKIX_PL_EKUCHECKER_H */ |