Add and use function test_pem to work out test filenames.
[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 our @tests = (
18     {
19         name => "renegotiate-client-no-resume",
20         server => {
21             "Options" => "NoResumptionOnRenegotiation",
22             "MaxProtocol" => "TLSv1.2"
23         },
24         client => {},
25         test => {
26             "Method" => "TLS",
27             "HandshakeMode" => "RenegotiateClient",
28             "ResumptionExpected" => "No",
29             "ExpectedResult" => "Success"
30         }
31     },
32     {
33         name => "renegotiate-client-resume",
34         server => {
35             "MaxProtocol" => "TLSv1.2"
36         },
37         client => {},
38         test => {
39             "Method" => "TLS",
40             "HandshakeMode" => "RenegotiateClient",
41             "ResumptionExpected" => "Yes",
42             "ExpectedResult" => "Success"
43         }
44     },
45     {
46         name => "renegotiate-server-no-resume",
47         server => {
48             "Options" => "NoResumptionOnRenegotiation",
49             "MaxProtocol" => "TLSv1.2"
50         },
51         client => {},
52         test => {
53             "Method" => "TLS",
54             "HandshakeMode" => "RenegotiateServer",
55             "ResumptionExpected" => "No",
56             "ExpectedResult" => "Success"
57         }
58     },
59     {
60         name => "renegotiate-server-resume",
61         server => {
62             "MaxProtocol" => "TLSv1.2"
63         },
64         client => {},
65         test => {
66             "Method" => "TLS",
67             "HandshakeMode" => "RenegotiateServer",
68             "ResumptionExpected" => "Yes",
69             "ExpectedResult" => "Success"
70         }
71     },
72     {
73         name => "renegotiate-client-auth-require",
74         server => {
75             "Options" => "NoResumptionOnRenegotiation",
76             "MaxProtocol" => "TLSv1.2",
77             "VerifyCAFile" => test_pem("root-cert.pem"),
78             "VerifyMode" => "Require",
79         },
80         client => {
81             "Certificate" => test_pem("ee-client-chain.pem"),
82             "PrivateKey"  => test_pem("ee-key.pem"),
83         },
84         test => {
85             "Method" => "TLS",
86             "HandshakeMode" => "RenegotiateServer",
87             "ResumptionExpected" => "No",
88             "ExpectedResult" => "Success"
89         }
90     },
91     {
92         name => "renegotiate-client-auth-once",
93         server => {
94             "Options" => "NoResumptionOnRenegotiation",
95             "MaxProtocol" => "TLSv1.2",
96             "VerifyCAFile" => test_pem("root-cert.pem"),
97             "VerifyMode" => "Once",
98         },
99         client => {
100             "Certificate" => test_pem("ee-client-chain.pem"),
101             "PrivateKey"  => test_pem("ee-key.pem"),
102         },
103         test => {
104             "Method" => "TLS",
105             "HandshakeMode" => "RenegotiateServer",
106             "ResumptionExpected" => "No",
107             "ExpectedResult" => "Success"
108         }
109     },
110     {
111         name => "renegotiate-aead-to-non-aead",
112         server => {
113             "Options" => "NoResumptionOnRenegotiation",
114             "MaxProtocol" => "TLSv1.2"
115         },
116         client => {
117             "CipherString" => "AES128-GCM-SHA256",
118             extra => {
119                 "RenegotiateCiphers" => "AES128-SHA"
120             }
121         },
122         test => {
123             "Method" => "TLS",
124             "HandshakeMode" => "RenegotiateClient",
125             "ResumptionExpected" => "No",
126             "ExpectedResult" => "Success"
127         }
128     },
129     {
130         name => "renegotiate-non-aead-to-aead",
131         server => {
132             "Options" => "NoResumptionOnRenegotiation",
133             "MaxProtocol" => "TLSv1.2"
134         },
135         client => {
136             "CipherString" => "AES128-SHA",
137             extra => {
138                 "RenegotiateCiphers" => "AES128-GCM-SHA256"
139             }
140         },
141         test => {
142             "Method" => "TLS",
143             "HandshakeMode" => "RenegotiateClient",
144             "ResumptionExpected" => "No",
145             "ExpectedResult" => "Success"
146         }
147     },
148     {
149         name => "renegotiate-non-aead-to-non-aead",
150         server => {
151             "Options" => "NoResumptionOnRenegotiation",
152             "MaxProtocol" => "TLSv1.2"
153         },
154         client => {
155             "CipherString" => "AES128-SHA",
156             extra => {
157                 "RenegotiateCiphers" => "AES256-SHA"
158             }
159         },
160         test => {
161             "Method" => "TLS",
162             "HandshakeMode" => "RenegotiateClient",
163             "ResumptionExpected" => "No",
164             "ExpectedResult" => "Success"
165         }
166     },
167     {
168         name => "renegotiate-aead-to-aead",
169         server => {
170             "Options" => "NoResumptionOnRenegotiation",
171             "MaxProtocol" => "TLSv1.2"
172         },
173         client => {
174             "CipherString" => "AES128-GCM-SHA256",
175             extra => {
176                 "RenegotiateCiphers" => "AES256-GCM-SHA384"
177             }
178         },
179         test => {
180             "Method" => "TLS",
181             "HandshakeMode" => "RenegotiateClient",
182             "ResumptionExpected" => "No",
183             "ExpectedResult" => "Success"
184         }
185     },
186 );