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 | * testutil_nss.h |
michael@0 | 6 | * |
michael@0 | 7 | * NSS-specific utility functions for handling test errors |
michael@0 | 8 | * |
michael@0 | 9 | */ |
michael@0 | 10 | |
michael@0 | 11 | #ifndef _TESTUTIL_NSS_H |
michael@0 | 12 | #define _TESTUTIL_NSS_H |
michael@0 | 13 | |
michael@0 | 14 | #include "pkix_tools.h" |
michael@0 | 15 | #include "plstr.h" |
michael@0 | 16 | #include "prprf.h" |
michael@0 | 17 | #include "prlong.h" |
michael@0 | 18 | #include "secutil.h" |
michael@0 | 19 | #include <stdio.h> |
michael@0 | 20 | #include <ctype.h> |
michael@0 | 21 | |
michael@0 | 22 | #ifdef __cplusplus |
michael@0 | 23 | extern "C" { |
michael@0 | 24 | #endif |
michael@0 | 25 | |
michael@0 | 26 | #include "pkix_pl_generalname.h" |
michael@0 | 27 | |
michael@0 | 28 | /* see source file for function documentation */ |
michael@0 | 29 | |
michael@0 | 30 | PKIX_PL_Cert * |
michael@0 | 31 | createCert( |
michael@0 | 32 | char *dirName, |
michael@0 | 33 | char *certFile, |
michael@0 | 34 | void *plContext); |
michael@0 | 35 | |
michael@0 | 36 | PKIX_PL_CRL * |
michael@0 | 37 | createCRL( |
michael@0 | 38 | char *dirName, |
michael@0 | 39 | char *crlFileName, |
michael@0 | 40 | void *plContext); |
michael@0 | 41 | |
michael@0 | 42 | PKIX_TrustAnchor * |
michael@0 | 43 | createTrustAnchor( |
michael@0 | 44 | char *dirName, |
michael@0 | 45 | char *taFileName, |
michael@0 | 46 | PKIX_Boolean useCert, |
michael@0 | 47 | void *plContext); |
michael@0 | 48 | |
michael@0 | 49 | PKIX_List * |
michael@0 | 50 | createCertChain( |
michael@0 | 51 | char *dirName, |
michael@0 | 52 | char *firstCertFileName, |
michael@0 | 53 | char *secondCertFileName, |
michael@0 | 54 | void *plContext); |
michael@0 | 55 | |
michael@0 | 56 | PKIX_List * |
michael@0 | 57 | createCertChainPlus( |
michael@0 | 58 | char *dirName, |
michael@0 | 59 | char *certNames[], |
michael@0 | 60 | PKIX_PL_Cert *certs[], |
michael@0 | 61 | PKIX_UInt32 numCerts, |
michael@0 | 62 | void *plContext); |
michael@0 | 63 | |
michael@0 | 64 | PKIX_PL_Date * |
michael@0 | 65 | createDate( |
michael@0 | 66 | char *asciiDate, |
michael@0 | 67 | void *plContext); |
michael@0 | 68 | |
michael@0 | 69 | |
michael@0 | 70 | PKIX_ProcessingParams * |
michael@0 | 71 | createProcessingParams( |
michael@0 | 72 | char *dirName, |
michael@0 | 73 | char *firstAnchorFileName, |
michael@0 | 74 | char *secondAnchorFileName, |
michael@0 | 75 | char *dateAscii, |
michael@0 | 76 | PKIX_List *initialPolicies, /* List of PKIX_PL_OID */ |
michael@0 | 77 | PKIX_Boolean isCrlEnabled, |
michael@0 | 78 | void *plContext); |
michael@0 | 79 | |
michael@0 | 80 | PKIX_ValidateParams * |
michael@0 | 81 | createValidateParams( |
michael@0 | 82 | char *dirName, |
michael@0 | 83 | char *firstAnchorFileName, |
michael@0 | 84 | char *secondAnchorFileName, |
michael@0 | 85 | char *dateAscii, |
michael@0 | 86 | PKIX_List *initialPolicies, /* List of PKIX_PL_OID */ |
michael@0 | 87 | PKIX_Boolean initialPolicyMappingInhibit, |
michael@0 | 88 | PKIX_Boolean initialAnyPolicyInhibit, |
michael@0 | 89 | PKIX_Boolean initialExplicitPolicy, |
michael@0 | 90 | PKIX_Boolean isCrlEnabled, |
michael@0 | 91 | PKIX_List *chain, |
michael@0 | 92 | void *plContext); |
michael@0 | 93 | |
michael@0 | 94 | PKIX_ValidateResult * |
michael@0 | 95 | createValidateResult( |
michael@0 | 96 | char *dirName, |
michael@0 | 97 | char *anchorFileName, |
michael@0 | 98 | char *pubKeyCertFileName, |
michael@0 | 99 | void *plContext); |
michael@0 | 100 | |
michael@0 | 101 | PKIX_BuildResult * |
michael@0 | 102 | createBuildResult( |
michael@0 | 103 | char *dirName, |
michael@0 | 104 | char *anchorFileName, |
michael@0 | 105 | char *pubKeyCertFileName, |
michael@0 | 106 | char *firstChainCertFileName, |
michael@0 | 107 | char *secondChainCertFileName, |
michael@0 | 108 | void *plContext); |
michael@0 | 109 | |
michael@0 | 110 | PKIX_PL_GeneralName * |
michael@0 | 111 | createGeneralName( |
michael@0 | 112 | PKIX_UInt32 nameType, |
michael@0 | 113 | char *asciiName, |
michael@0 | 114 | void *plContext); |
michael@0 | 115 | |
michael@0 | 116 | #ifdef __cplusplus |
michael@0 | 117 | } |
michael@0 | 118 | #endif |
michael@0 | 119 | |
michael@0 | 120 | #endif /* TESTUTIL_NSS_H */ |