]> git.saurik.com Git - apple/security.git/blob - SecurityTests/clxutils/certcrl/testSubjects/emptyCert/emptyCert.scr
Security-57031.1.35.tar.gz
[apple/security.git] / SecurityTests / clxutils / certcrl / testSubjects / emptyCert / emptyCert.scr
1 #
2 # Test for empty/bad cert handling, Radar 3116734.
3 # Without the fix for 3116734, this results in an assertion failure on
4 # debug Security.framework.
5 #
6 globals
7 allowUnverified = true
8 crlNetFetchEnable = false
9 certNetFetchEnable = false
10 useSystemAnchors = false
11 end
12
13 test = "Basic good verify as sanity check"
14 cert = leaf.cer
15 cert = CA.cer
16 root = root.cer
17 # IS_IN_ANCHORS | IS_ROOT
18 certstatus = 2:0x18
19 end
20
21 test = "Throw in empty cert not as leaf, it should be ignored"
22 cert = leaf.cer
23 cert = CA.cer
24 cert = emptyCert.cer
25 root = root.cer
26 # IS_IN_ANCHORS | IS_ROOT
27 certstatus = 2:0x18
28 end
29
30 test = "Throw in text file not as leaf, it should be ignored"
31 cert = leaf.cer
32 cert = CA.cer
33 cert = emptyCert.scr
34 root = root.cer
35 # IS_IN_ANCHORS | IS_ROOT
36 certstatus = 2:0x18
37 end
38
39 test = "Empty cert as leaf, expect error"
40 cert = emptyCert.cer
41 cert = CA.cer
42 root = root.cer
43 error = CSSMERR_TP_INVALID_CERTIFICATE
44 end
45
46 test = "Text file as leaf, expect error"
47 cert = emptyCert.cer
48 cert = CA.cer
49 root = root.cer
50 error = CSSMERR_TP_INVALID_CERTIFICATE
51 end