Provide a test for the Encrypt-Then-Mac renegotiation crash
[openssl.git] / test / ssl-tests / 17-renegotiate.conf.in
1 # -*- mode: perl; -*-
2 # Copyright 2016-2016 The OpenSSL Project Authors. All Rights Reserved.
3 #
4 # Licensed under the OpenSSL license (the "License").  You may not use
5 # this file except in compliance with the License.  You can obtain a copy
6 # in the file LICENSE in the source distribution or at
7 # https://www.openssl.org/source/license.html
8
9
10 ## Test Renegotiation
11
12 use strict;
13 use warnings;
14
15 package ssltests;
16
17 my $dir_sep = $^O ne "VMS" ? "/" : "";
18
19 our @tests = (
20     {
21         name => "renegotiate-client-no-resume",
22         server => {
23             "Options" => "NoResumptionOnRenegotiation",
24             "MaxProtocol" => "TLSv1.2"
25         },
26         client => {},
27         test => {
28             "Method" => "TLS",
29             "HandshakeMode" => "RenegotiateClient",
30             "ResumptionExpected" => "No",
31             "ExpectedResult" => "Success"
32         }
33     },
34     {
35         name => "renegotiate-client-resume",
36         server => {
37             "MaxProtocol" => "TLSv1.2"
38         },
39         client => {},
40         test => {
41             "Method" => "TLS",
42             "HandshakeMode" => "RenegotiateClient",
43             "ResumptionExpected" => "Yes",
44             "ExpectedResult" => "Success"
45         }
46     },
47     {
48         name => "renegotiate-server-no-resume",
49         server => {
50             "Options" => "NoResumptionOnRenegotiation",
51             "MaxProtocol" => "TLSv1.2"
52         },
53         client => {},
54         test => {
55             "Method" => "TLS",
56             "HandshakeMode" => "RenegotiateServer",
57             "ResumptionExpected" => "No",
58             "ExpectedResult" => "Success"
59         }
60     },
61     {
62         name => "renegotiate-server-resume",
63         server => {
64             "MaxProtocol" => "TLSv1.2"
65         },
66         client => {},
67         test => {
68             "Method" => "TLS",
69             "HandshakeMode" => "RenegotiateServer",
70             "ResumptionExpected" => "Yes",
71             "ExpectedResult" => "Success"
72         }
73     },
74     {
75         name => "renegotiate-client-auth-require",
76         server => {
77             "Options" => "NoResumptionOnRenegotiation",
78             "MaxProtocol" => "TLSv1.2",
79             "VerifyCAFile" => "\${ENV::TEST_CERTS_DIR}${dir_sep}root-cert.pem",
80             "VerifyMode" => "Require",
81         },
82         client => {
83             "Certificate" => "\${ENV::TEST_CERTS_DIR}${dir_sep}ee-client-chain.pem",
84             "PrivateKey"  => "\${ENV::TEST_CERTS_DIR}${dir_sep}ee-key.pem"
85         },
86         test => {
87             "Method" => "TLS",
88             "HandshakeMode" => "RenegotiateServer",
89             "ResumptionExpected" => "No",
90             "ExpectedResult" => "Success"
91         }
92     },
93     {
94         name => "renegotiate-client-auth-once",
95         server => {
96             "Options" => "NoResumptionOnRenegotiation",
97             "MaxProtocol" => "TLSv1.2",
98             "VerifyCAFile" => "\${ENV::TEST_CERTS_DIR}${dir_sep}root-cert.pem",
99             "VerifyMode" => "Once",
100         },
101         client => {
102             "Certificate" => "\${ENV::TEST_CERTS_DIR}${dir_sep}ee-client-chain.pem",
103             "PrivateKey"  => "\${ENV::TEST_CERTS_DIR}${dir_sep}ee-key.pem"
104         },
105         test => {
106             "Method" => "TLS",
107             "HandshakeMode" => "RenegotiateServer",
108             "ResumptionExpected" => "No",
109             "ExpectedResult" => "Success"
110         }
111     },
112     {
113         name => "renegotiate-aead-to-non-aead",
114         server => {
115             "Options" => "NoResumptionOnRenegotiation",
116             "MaxProtocol" => "TLSv1.2"
117         },
118         client => {
119             "CipherString" => "AES128-GCM-SHA256",
120             extra => {
121                 "RenegotiateCiphers" => "AES128-SHA"
122             }
123         },
124         test => {
125             "Method" => "TLS",
126             "HandshakeMode" => "RenegotiateClient",
127             "ResumptionExpected" => "No",
128             "ExpectedResult" => "Success"
129         }
130     },
131     {
132         name => "renegotiate-non-aead-to-aead",
133         server => {
134             "Options" => "NoResumptionOnRenegotiation",
135             "MaxProtocol" => "TLSv1.2"
136         },
137         client => {
138             "CipherString" => "AES128-SHA",
139             extra => {
140                 "RenegotiateCiphers" => "AES128-GCM-SHA256"
141             }
142         },
143         test => {
144             "Method" => "TLS",
145             "HandshakeMode" => "RenegotiateClient",
146             "ResumptionExpected" => "No",
147             "ExpectedResult" => "Success"
148         }
149     },
150     {
151         name => "renegotiate-non-aead-to-non-aead",
152         server => {
153             "Options" => "NoResumptionOnRenegotiation",
154             "MaxProtocol" => "TLSv1.2"
155         },
156         client => {
157             "CipherString" => "AES128-SHA",
158             extra => {
159                 "RenegotiateCiphers" => "AES256-SHA"
160             }
161         },
162         test => {
163             "Method" => "TLS",
164             "HandshakeMode" => "RenegotiateClient",
165             "ResumptionExpected" => "No",
166             "ExpectedResult" => "Success"
167         }
168     },
169     {
170         name => "renegotiate-aead-to-aead",
171         server => {
172             "Options" => "NoResumptionOnRenegotiation",
173             "MaxProtocol" => "TLSv1.2"
174         },
175         client => {
176             "CipherString" => "AES128-GCM-SHA256",
177             extra => {
178                 "RenegotiateCiphers" => "AES256-GCM-SHA384"
179             }
180         },
181         test => {
182             "Method" => "TLS",
183             "HandshakeMode" => "RenegotiateClient",
184             "ResumptionExpected" => "No",
185             "ExpectedResult" => "Success"
186         }
187     },
188 );