]> git.saurik.com Git - apple/security.git/blob - SecurityTests/clxutils/certcrl/script.h
Security-57336.1.9.tar.gz
[apple/security.git] / SecurityTests / clxutils / certcrl / script.h
1 /*
2 * script.h - run certcrl from script file
3 */
4
5 #ifndef _SCRIPT_H_
6 #define _SCRIPT_H_
7
8 #include <Security/cssmtype.h>
9
10 /*
11 * Test variables which can be specified at the top level (on the
12 * call to runScript), or globally in a script, or within the scope
13 * of one test.
14 */
15 typedef struct {
16 CSSM_BOOL allowUnverified;
17 CSSM_BOOL requireCrlIfPresent;
18 CSSM_BOOL requireOcspIfPresent;
19 CSSM_BOOL crlNetFetchEnable;
20 CSSM_BOOL certNetFetchEnable;
21 CSSM_BOOL useSystemAnchors;
22 CSSM_BOOL useTrustSettings;
23 CSSM_BOOL leafCertIsCA;
24 CSSM_BOOL cacheDisable;
25 CSSM_BOOL ocspNetFetchDisable;
26 CSSM_BOOL requireCrlForAll;
27 CSSM_BOOL requireOcspForAll;
28 } ScriptVars;
29
30 extern "C" {
31 int runScript(
32 const char *fileName,
33 CSSM_TP_HANDLE tpHand,
34 CSSM_CL_HANDLE clHand,
35 CSSM_CSP_HANDLE cspHand,
36 CSSM_DL_HANDLE dlHand,
37 ScriptVars *scriptVars,
38 CSSM_BOOL quiet,
39 CSSM_BOOL verbose,
40 CSSM_BOOL doPause);
41
42 /* parse policy string; returns nonzero of not found */
43 int parsePolicyString(
44 const char *str,
45 CertVerifyPolicy *policy);
46
47 void printPolicyStrings();
48 void printScriptVars();
49
50 }
51 #endif /* _SCRIPT_H_ */