* parse-packet.c (parse_user_id): Cap the user ID size at 2048 bytes.
[gnupg.git] / checks / multisig.test
1 #!/bin/sh
2 # Check that gpg verifies only signatures where there is no ambiguity
3 # in the order of packets.  Needs the Demo Keys Lima and Mike.
4
5 # Note: We do son't support multiple signaturess anymore thus thsi test is 
6 # not really needed becuase verify could do the same.  We keep it anyway.
7
8 . $srcdir/defs.inc || exit 3
9
10 suspend_error
11
12
13
14 sig_1ls1ls_valid='
15 -----BEGIN PGP ARMORED FILE-----
16
17 kA0DAAIRN8q1H7eRA/gBrCdiBXRleHQxOogq9EkgYW0gc29ycnksIEkgY2FuJ3Qg
18 ZG8gdGhhdAqIPwMFADqIKvQ3yrUft5ED+BEC2joAoJaSaXOZEtSZqQ780HIXG77e
19 8PB7AJ4wCprmaFTO0fBaTcXDuEOBdAWnOZANAwACETfKtR+3kQP4AawnYgV0ZXh0
20 MTqIKvRJIGFtIHNvcnJ5LCBJIGNhbid0IGRvIHRoYXQKiD8DBQA6iCr0N8q1H7eR
21 A/gRAto6AKCWkmlzmRLUmakO/NByFxu+3vDwewCeMAqa5mhUztHwWk3Fw7hDgXQF
22 pzk=
23 =8jSC
24 -----END PGP ARMORED FILE-----
25 '
26 sig_ls_valid='
27 -----BEGIN PGP ARMORED FILE-----
28
29 rCdiBXRleHQxOogrS0kgYW0gc29ycnksIEkgY2FuJ3QgZG8gdGhhdAqIPwMFADqI
30 K0s3yrUft5ED+BECLQMAn2jZUNOpB4OuurSQkc2TRfg6ek02AJ9+oJS0frQ+yUsT
31 QDUFTH2PvZRxjw==
32 =J+lb
33 -----END PGP ARMORED FILE-----
34 '
35 sig_sl_valid='
36 -----BEGIN PGP ARMORED FILE-----
37
38 iD8DBQA6iCtLN8q1H7eRA/gRAi0DAJ9o2VDTqQeDrrq0kJHNk0X4OnpNNgCffqCU
39 tH60PslLE0A1BUx9j72UcY+sJ2IFdGV4dDE6iCtLSSBhbSBzb3JyeSwgSSBjYW4n
40 dCBkbyB0aGF0Cg==
41 =N9MP
42 -----END PGP ARMORED FILE-----
43 '
44 sig_11lss_valid_but_is_not='
45 -----BEGIN PGP ARMORED FILE-----
46
47 kA0DAAIRN8q1H7eRA/gAkA0DAAIRN8q1H7eRA/gBrCdiBXRleHQxOogyXUkgYW0g
48 c29ycnksIEkgY2FuJ3QgZG8gdGhhdAqIPwMFADqIMl03yrUft5ED+BECwQAAnRXT
49 mXjVd385oD38W80XuheWKTGcAJ9pZ6/flaKDfw+SLido7xaUHuhp5Yg/AwUAOogy
50 XTfKtR+3kQP4EQLBAACgnN0IP+NztE0aAc/DZ17yHWR9diwAniN0P01WmbgZJoZB
51 Q341WRXKS/at
52 =Ekrs
53 -----END PGP ARMORED FILE-----
54 '
55 sig_11lss11lss_valid_but_is_not='
56 -----BEGIN PGP ARMORED FILE-----
57
58 kA0DAAIRN8q1H7eRA/gAkA0DAAIRN8q1H7eRA/gBrCdiBXRleHQxOogyXUkgYW0g
59 c29ycnksIEkgY2FuJ3QgZG8gdGhhdAqIPwMFADqIMl03yrUft5ED+BECwQAAnRXT
60 mXjVd385oD38W80XuheWKTGcAJ9pZ6/flaKDfw+SLido7xaUHuhp5Yg/AwUAOogy
61 XTfKtR+3kQP4EQLBAACgnN0IP+NztE0aAc/DZ17yHWR9diwAniN0P01WmbgZJoZB
62 Q341WRXKS/atkA0DAAIRN8q1H7eRA/gAkA0DAAIRN8q1H7eRA/gBrCdiBXRleHQx
63 OogyXUkgYW0gc29ycnksIEkgY2FuJ3QgZG8gdGhhdAqIPwMFADqIMl03yrUft5ED
64 +BECwQAAnRXTmXjVd385oD38W80XuheWKTGcAJ9pZ6/flaKDfw+SLido7xaUHuhp
65 5Yg/AwUAOogyXTfKtR+3kQP4EQLBAACgnN0IP+NztE0aAc/DZ17yHWR9diwAniN0
66 P01WmbgZJoZBQ341WRXKS/at
67 =P1Mu
68 -----END PGP ARMORED FILE-----
69 '
70 sig_ssl_valid_but_is_not='
71 -----BEGIN PGP ARMORED FILE-----
72
73 iD8DBQA6iCtLN8q1H7eRA/gRAi0DAJ9o2VDTqQeDrrq0kJHNk0X4OnpNNgCffqCU
74 tH60PslLE0A1BUx9j72UcY+IPwMFADqIK0s3yrUft5ED+BECLQMAn2jZUNOpB4Ou
75 urSQkc2TRfg6ek02AJ9+oJS0frQ+yUsTQDUFTH2PvZRxj6wnYgV0ZXh0MTqIK0tJ
76 IGFtIHNvcnJ5LCBJIGNhbid0IGRvIHRoYXQK
77 =Zven
78 -----END PGP ARMORED FILE-----
79 '
80 sig_1lsls_invalid='
81 -----BEGIN PGP ARMORED FILE-----
82
83 kA0DAAIRN8q1H7eRA/gBrCdiBXRleHQxOogq9EkgYW0gc29ycnksIEkgY2FuJ3Qg
84 ZG8gdGhhdAqIPwMFADqIKvQ3yrUft5ED+BEC2joAoJaSaXOZEtSZqQ780HIXG77e
85 8PB7AJ4wCprmaFTO0fBaTcXDuEOBdAWnOawnYgV0ZXh0MTqIK0tJIGFtIHNvcnJ5
86 LCBJIGNhbid0IGRvIHRoYXQKiD8DBQA6iCtLN8q1H7eRA/gRAi0DAJ9o2VDTqQeD
87 rrq0kJHNk0X4OnpNNgCffqCUtH60PslLE0A1BUx9j72UcY8=
88 =nkeu
89 -----END PGP ARMORED FILE-----
90 '
91 sig_lsls_invalid='
92 -----BEGIN PGP ARMORED FILE-----
93
94 rCdiBXRleHQxOogrS0kgYW0gc29ycnksIEkgY2FuJ3QgZG8gdGhhdAqIPwMFADqI
95 K0s3yrUft5ED+BECLQMAn2jZUNOpB4OuurSQkc2TRfg6ek02AJ9+oJS0frQ+yUsT
96 QDUFTH2PvZRxj6wnYgV0ZXh0MTqIK0tJIGFtIHNvcnJ5LCBJIGNhbid0IGRvIHRo
97 YXQKiD8DBQA6iCtLN8q1H7eRA/gRAi0DAJ9o2VDTqQeDrrq0kJHNk0X4OnpNNgCf
98 fqCUtH60PslLE0A1BUx9j72UcY8=
99 =BlZH
100 -----END PGP ARMORED FILE-----
101 '
102 sig_lss_invalid='
103 -----BEGIN PGP ARMORED FILE-----
104
105 rCdiBXRleHQxOogrS0kgYW0gc29ycnksIEkgY2FuJ3QgZG8gdGhhdAqIPwMFADqI
106 K0s3yrUft5ED+BECLQMAn2jZUNOpB4OuurSQkc2TRfg6ek02AJ9+oJS0frQ+yUsT
107 QDUFTH2PvZRxj4g/AwUAOogrSzfKtR+3kQP4EQItAwCfaNlQ06kHg666tJCRzZNF
108 +Dp6TTYAn36glLR+tD7JSxNANQVMfY+9lHGP
109 =jmt6
110 -----END PGP ARMORED FILE-----
111 '
112 sig_slsl_invalid='
113 -----BEGIN PGP ARMORED FILE-----
114
115 iD8DBQA6iCtLN8q1H7eRA/gRAi0DAJ9o2VDTqQeDrrq0kJHNk0X4OnpNNgCffqCU
116 tH60PslLE0A1BUx9j72UcY+sJ2IFdGV4dDE6iCtLSSBhbSBzb3JyeSwgSSBjYW4n
117 dCBkbyB0aGF0Cog/AwUAOogrSzfKtR+3kQP4EQItAwCfaNlQ06kHg666tJCRzZNF
118 +Dp6TTYAn36glLR+tD7JSxNANQVMfY+9lHGPrCdiBXRleHQxOogrS0kgYW0gc29y
119 cnksIEkgY2FuJ3QgZG8gdGhhdAo=
120 =phBF
121 -----END PGP ARMORED FILE-----
122 '
123
124
125 for i in  sig_sl_valid ; do
126     eval "(IFS=; echo \"\$$i\")" | ./gpg_dearmor >x
127     $GPG --verify x 2>/dev/null || error "valid is invalid ($i)"
128     linefeed
129 done
130 #for i in "$sig_11lss_valid_but_is_not" "$sig_11lss11lss_valid_but_is_not" \
131 #         "$sig_ssl_valid_but_is_not"; do
132 #    echo "$i" | $GPG --dearmor >x
133 #    $GPG --verify <x 2>/dev/null || error "valid is invalid"
134 #done
135
136 for i in sig_1ls1ls_valid sig_ls_valid \
137          sig_1lsls_invalid sig_lsls_invalid \
138          sig_lss_invalid sig_slsl_invalid ; do
139     eval "(IFS=; echo \"\$$i\")" | ./gpg_dearmor >x
140     $GPG --verify <x 2>/dev/null && error "invalid is valid ($i)"
141     linefeed
142 done
143
144
145 resume_error