1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/security/nss/cmd/libpkix/testutil/testutil_nss.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,120 @@ 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 + * testutil_nss.h 1.9 + * 1.10 + * NSS-specific utility functions for handling test errors 1.11 + * 1.12 + */ 1.13 + 1.14 +#ifndef _TESTUTIL_NSS_H 1.15 +#define _TESTUTIL_NSS_H 1.16 + 1.17 +#include "pkix_tools.h" 1.18 +#include "plstr.h" 1.19 +#include "prprf.h" 1.20 +#include "prlong.h" 1.21 +#include "secutil.h" 1.22 +#include <stdio.h> 1.23 +#include <ctype.h> 1.24 + 1.25 +#ifdef __cplusplus 1.26 +extern "C" { 1.27 +#endif 1.28 + 1.29 +#include "pkix_pl_generalname.h" 1.30 + 1.31 +/* see source file for function documentation */ 1.32 + 1.33 +PKIX_PL_Cert * 1.34 +createCert( 1.35 + char *dirName, 1.36 + char *certFile, 1.37 + void *plContext); 1.38 + 1.39 +PKIX_PL_CRL * 1.40 +createCRL( 1.41 + char *dirName, 1.42 + char *crlFileName, 1.43 + void *plContext); 1.44 + 1.45 +PKIX_TrustAnchor * 1.46 +createTrustAnchor( 1.47 + char *dirName, 1.48 + char *taFileName, 1.49 + PKIX_Boolean useCert, 1.50 + void *plContext); 1.51 + 1.52 +PKIX_List * 1.53 +createCertChain( 1.54 + char *dirName, 1.55 + char *firstCertFileName, 1.56 + char *secondCertFileName, 1.57 + void *plContext); 1.58 + 1.59 +PKIX_List * 1.60 +createCertChainPlus( 1.61 + char *dirName, 1.62 + char *certNames[], 1.63 + PKIX_PL_Cert *certs[], 1.64 + PKIX_UInt32 numCerts, 1.65 + void *plContext); 1.66 + 1.67 +PKIX_PL_Date * 1.68 +createDate( 1.69 + char *asciiDate, 1.70 + void *plContext); 1.71 + 1.72 + 1.73 +PKIX_ProcessingParams * 1.74 +createProcessingParams( 1.75 + char *dirName, 1.76 + char *firstAnchorFileName, 1.77 + char *secondAnchorFileName, 1.78 + char *dateAscii, 1.79 + PKIX_List *initialPolicies, /* List of PKIX_PL_OID */ 1.80 + PKIX_Boolean isCrlEnabled, 1.81 + void *plContext); 1.82 + 1.83 +PKIX_ValidateParams * 1.84 +createValidateParams( 1.85 + char *dirName, 1.86 + char *firstAnchorFileName, 1.87 + char *secondAnchorFileName, 1.88 + char *dateAscii, 1.89 + PKIX_List *initialPolicies, /* List of PKIX_PL_OID */ 1.90 + PKIX_Boolean initialPolicyMappingInhibit, 1.91 + PKIX_Boolean initialAnyPolicyInhibit, 1.92 + PKIX_Boolean initialExplicitPolicy, 1.93 + PKIX_Boolean isCrlEnabled, 1.94 + PKIX_List *chain, 1.95 + void *plContext); 1.96 + 1.97 +PKIX_ValidateResult * 1.98 +createValidateResult( 1.99 + char *dirName, 1.100 + char *anchorFileName, 1.101 + char *pubKeyCertFileName, 1.102 + void *plContext); 1.103 + 1.104 +PKIX_BuildResult * 1.105 +createBuildResult( 1.106 + char *dirName, 1.107 + char *anchorFileName, 1.108 + char *pubKeyCertFileName, 1.109 + char *firstChainCertFileName, 1.110 + char *secondChainCertFileName, 1.111 + void *plContext); 1.112 + 1.113 +PKIX_PL_GeneralName * 1.114 +createGeneralName( 1.115 + PKIX_UInt32 nameType, 1.116 + char *asciiName, 1.117 + void *plContext); 1.118 + 1.119 +#ifdef __cplusplus 1.120 +} 1.121 +#endif 1.122 + 1.123 +#endif /* TESTUTIL_NSS_H */