3 ## SSL test configurations
10 use OpenSSL::Test::Utils;
18 #TODO(3.0): No EdDSA support in FIPS mode at the moment
20 "ECDSA.Certificate" => test_pem("server-ecdsa-cert.pem"),
21 "ECDSA.PrivateKey" => test_pem("server-ecdsa-key.pem"),
22 "MaxProtocol" => "TLSv1.2"
26 "ECDSA.Certificate" => test_pem("server-ecdsa-cert.pem"),
27 "ECDSA.PrivateKey" => test_pem("server-ecdsa-key.pem"),
28 "Ed25519.Certificate" => test_pem("server-ed25519-cert.pem"),
29 "Ed25519.PrivateKey" => test_pem("server-ed25519-key.pem"),
30 "Ed448.Certificate" => test_pem("server-ed448-cert.pem"),
31 "Ed448.PrivateKey" => test_pem("server-ed448-key.pem"),
32 "MaxProtocol" => "TLSv1.2"
37 "PSS.Certificate" => test_pem("server-pss-cert.pem"),
38 "PSS.PrivateKey" => test_pem("server-pss-key.pem"),
39 "ECDSA.Certificate" => test_pem("server-ecdsa-cert.pem"),
40 "ECDSA.PrivateKey" => test_pem("server-ecdsa-key.pem"),
41 "Ed25519.Certificate" => test_pem("server-ed25519-cert.pem"),
42 "Ed25519.PrivateKey" => test_pem("server-ed25519-key.pem"),
43 "Ed448.Certificate" => test_pem("server-ed448-cert.pem"),
44 "Ed448.PrivateKey" => test_pem("server-ed448-key.pem"),
45 "MaxProtocol" => "TLSv1.2"
48 my $server_pss_only = {
49 "Certificate" => test_pem("server-pss-cert.pem"),
50 "PrivateKey" => test_pem("server-pss-key.pem"),
53 my $server_pss_restrict_only = {
54 "Certificate" => test_pem("server-pss-restrict-cert.pem"),
55 "PrivateKey" => test_pem("server-pss-restrict-key.pem"),
60 if ($no_deflt_libctx) {
62 "Certificate" => test_pem("servercert.pem"),
63 "PrivateKey" => test_pem("serverkey.pem"),
67 "PSS.Certificate" => test_pem("server-pss-cert.pem"),
68 "PSS.PrivateKey" => test_pem("server-pss-key.pem"),
69 "Certificate" => test_pem("servercert.pem"),
70 "PrivateKey" => test_pem("serverkey.pem"),
76 name => "ECDSA CipherString Selection",
79 "CipherString" => "aECDSA",
80 "MaxProtocol" => "TLSv1.2",
81 "RequestCAFile" => test_pem("root-cert.pem"),
84 "ExpectedServerCertType" =>, "P-256",
85 "ExpectedServerSignType" =>, "EC",
86 # Note: certificate_authorities not sent for TLS < 1.3
87 "ExpectedServerCANames" =>, "empty",
88 "ExpectedResult" => "Success"
92 name => "ECDSA CipherString Selection",
94 "ECDSA.Certificate" => test_pem("server-ecdsa-cert.pem"),
95 "ECDSA.PrivateKey" => test_pem("server-ecdsa-key.pem"),
96 "MaxProtocol" => "TLSv1.2",
97 #Deliberately set supported_groups to one not in the cert. This
102 "CipherString" => "aECDSA",
103 "MaxProtocol" => "TLSv1.2",
104 "Groups" => "P-256:P-384",
105 "RequestCAFile" => test_pem("root-cert.pem"),
108 "ExpectedServerCertType" =>, "P-256",
109 "ExpectedServerSignType" =>, "EC",
110 # Note: certificate_authorities not sent for TLS < 1.3
111 "ExpectedServerCANames" =>, "empty",
112 "ExpectedResult" => "Success"
116 name => "ECDSA CipherString Selection",
118 "ECDSA.Certificate" => test_pem("server-ecdsa-cert.pem"),
119 "ECDSA.PrivateKey" => test_pem("server-ecdsa-key.pem"),
120 "MaxProtocol" => "TLSv1.2",
121 "Groups" => "P-256:P-384"
124 "CipherString" => "aECDSA",
125 "MaxProtocol" => "TLSv1.2",
126 #Deliberately set groups to not include the certificate group. This
129 "RequestCAFile" => test_pem("root-cert.pem"),
132 "ExpectedResult" => "ServerFail"
136 name => "RSA CipherString Selection",
139 "CipherString" => "aRSA",
140 "MaxProtocol" => "TLSv1.2",
143 "ExpectedServerCertType" =>, "RSA",
144 "ExpectedServerSignType" =>, "RSA-PSS",
145 "ExpectedResult" => "Success"
149 name => "P-256 CipherString and Signature Algorithm Selection",
152 "CipherString" => "aECDSA",
153 "MaxProtocol" => "TLSv1.2",
154 "SignatureAlgorithms" => "ECDSA+SHA256:ed25519",
157 "ExpectedServerCertType" => "P-256",
158 "ExpectedServerSignHash" => "SHA256",
159 "ExpectedServerSignType" => "EC",
160 "ExpectedResult" => "Success"
164 name => "ECDSA CipherString Selection, no ECDSA certificate",
166 "MaxProtocol" => "TLSv1.2"
169 "CipherString" => "aECDSA",
170 "MaxProtocol" => "TLSv1.2"
173 "ExpectedResult" => "ServerFail"
177 name => "ECDSA Signature Algorithm Selection",
180 "SignatureAlgorithms" => "ECDSA+SHA256",
183 "ExpectedServerCertType" => "P-256",
184 "ExpectedServerSignHash" => "SHA256",
185 "ExpectedServerSignType" => "EC",
186 "ExpectedResult" => "Success"
190 name => "ECDSA Signature Algorithm Selection SHA384",
193 "SignatureAlgorithms" => "ECDSA+SHA384",
196 "ExpectedServerCertType" => "P-256",
197 "ExpectedServerSignHash" => "SHA384",
198 "ExpectedServerSignType" => "EC",
199 "ExpectedResult" => "Success"
203 name => "ECDSA Signature Algorithm Selection SHA1",
206 "SignatureAlgorithms" => "ECDSA+SHA1",
209 "ExpectedServerCertType" => "P-256",
210 "ExpectedServerSignHash" => "SHA1",
211 "ExpectedServerSignType" => "EC",
212 "ExpectedResult" => "Success"
216 name => "ECDSA Signature Algorithm Selection compressed point",
218 "ECDSA.Certificate" => test_pem("server-cecdsa-cert.pem"),
219 "ECDSA.PrivateKey" => test_pem("server-cecdsa-key.pem"),
220 "MaxProtocol" => "TLSv1.2"
223 "SignatureAlgorithms" => "ECDSA+SHA256",
226 "ExpectedServerCertType" => "P-256",
227 "ExpectedServerSignHash" => "SHA256",
228 "ExpectedServerSignType" => "EC",
229 "ExpectedResult" => "Success"
233 name => "ECDSA Signature Algorithm Selection, no ECDSA certificate",
235 "MaxProtocol" => "TLSv1.2"
238 "SignatureAlgorithms" => "ECDSA+SHA256",
241 "ExpectedResult" => "ServerFail"
245 name => "RSA Signature Algorithm Selection",
248 "SignatureAlgorithms" => "RSA+SHA256",
251 "ExpectedServerCertType" => "RSA",
252 "ExpectedServerSignHash" => "SHA256",
253 "ExpectedServerSignType" => "RSA",
254 "ExpectedResult" => "Success"
258 name => "RSA-PSS Signature Algorithm Selection",
261 "SignatureAlgorithms" => "RSA-PSS+SHA256",
264 "ExpectedServerCertType" => "RSA",
265 "ExpectedServerSignHash" => "SHA256",
266 "ExpectedServerSignType" => "RSA-PSS",
267 "ExpectedResult" => "Success"
271 name => "RSA key exchange with all RSA certificate types",
272 server => $server_rsa_all,
274 "CipherString" => "kRSA",
275 "MaxProtocol" => "TLSv1.2",
278 "ExpectedServerCertType" =>, "RSA",
279 "ExpectedResult" => "Success"
283 name => "Suite B P-256 Hash Algorithm Selection",
285 "ECDSA.Certificate" => test_pem("p256-server-cert.pem"),
286 "ECDSA.PrivateKey" => test_pem("p256-server-key.pem"),
287 "MaxProtocol" => "TLSv1.2",
288 "CipherString" => "SUITEB128"
291 "VerifyCAFile" => test_pem("p384-root.pem"),
292 "SignatureAlgorithms" => "ECDSA+SHA384:ECDSA+SHA256"
295 "ExpectedServerCertType" => "P-256",
296 "ExpectedServerSignHash" => "SHA256",
297 "ExpectedServerSignType" => "EC",
298 "ExpectedResult" => "Success"
302 name => "Suite B P-384 Hash Algorithm Selection",
304 "ECDSA.Certificate" => test_pem("p384-server-cert.pem"),
305 "ECDSA.PrivateKey" => test_pem("p384-server-key.pem"),
306 "MaxProtocol" => "TLSv1.2",
307 "CipherString" => "SUITEB128"
310 "VerifyCAFile" => test_pem("p384-root.pem"),
311 "SignatureAlgorithms" => "ECDSA+SHA256:ECDSA+SHA384"
314 "ExpectedServerCertType" => "P-384",
315 "ExpectedServerSignHash" => "SHA384",
316 "ExpectedServerSignType" => "EC",
317 "ExpectedResult" => "Success"
322 my @tests_non_fips = (
323 # TODO(3.0) No Ed25519/Ed448 in FIPS mode at the moment
325 name => "Ed25519 CipherString and Signature Algorithm Selection",
328 "CipherString" => "aECDSA",
329 "MaxProtocol" => "TLSv1.2",
330 "SignatureAlgorithms" => "ed25519:ECDSA+SHA256",
331 "RequestCAFile" => test_pem("root-cert.pem"),
334 "ExpectedServerCertType" =>, "Ed25519",
335 "ExpectedServerSignType" =>, "Ed25519",
336 # Note: certificate_authorities not sent for TLS < 1.3
337 "ExpectedServerCANames" =>, "empty",
338 "ExpectedResult" => "Success"
342 name => "Ed448 CipherString and Signature Algorithm Selection",
345 "CipherString" => "aECDSA",
346 "MaxProtocol" => "TLSv1.2",
347 "SignatureAlgorithms" => "ed448:ECDSA+SHA256",
348 "RequestCAFile" => test_pem("root-ed448-cert.pem"),
349 "VerifyCAFile" => test_pem("root-ed448-cert.pem"),
352 "ExpectedServerCertType" =>, "Ed448",
353 "ExpectedServerSignType" =>, "Ed448",
354 # Note: certificate_authorities not sent for TLS < 1.3
355 "ExpectedServerCANames" =>, "empty",
356 "ExpectedResult" => "Success"
360 name => "ECDSA with brainpool",
362 "Certificate" => test_pem("server-ecdsa-brainpoolP256r1-cert.pem"),
363 "PrivateKey" => test_pem("server-ecdsa-brainpoolP256r1-key.pem"),
364 "Groups" => "brainpoolP256r1",
367 #We don't restrict this to TLSv1.2, although use of brainpool
368 #should force this anyway so that this should succeed
369 "CipherString" => "aECDSA",
370 "RequestCAFile" => test_pem("root-cert.pem"),
371 "Groups" => "brainpoolP256r1",
374 "ExpectedServerCertType" =>, "brainpoolP256r1",
375 "ExpectedServerSignType" =>, "EC",
376 # Note: certificate_authorities not sent for TLS < 1.3
377 "ExpectedServerCANames" =>, "empty",
378 "ExpectedResult" => "Success"
382 name => "Ed25519 CipherString and Curves Selection",
385 "CipherString" => "aECDSA",
386 "MaxProtocol" => "TLSv1.2",
387 "SignatureAlgorithms" => "ECDSA+SHA256:ed25519",
388 # Excluding P-256 from the supported curves list means server
389 # certificate should be Ed25519 and not P-256
393 "ExpectedServerCertType" =>, "Ed25519",
394 "ExpectedServerSignType" =>, "Ed25519",
395 "ExpectedResult" => "Success"
399 name => "Ed448 CipherString and Curves Selection",
402 "CipherString" => "aECDSA",
403 "MaxProtocol" => "TLSv1.2",
404 "SignatureAlgorithms" => "ECDSA+SHA256:ed448",
405 "VerifyCAFile" => test_pem("root-ed448-cert.pem"),
406 # Excluding P-256 from the supported curves list means server
407 # certificate should be Ed25519 and not P-256
411 "ExpectedServerCertType" =>, "Ed448",
412 "ExpectedServerSignType" =>, "Ed448",
413 "ExpectedResult" => "Success"
417 name => "TLS 1.2 Ed25519 Client Auth",
419 "VerifyCAFile" => test_pem("root-cert.pem"),
420 "VerifyMode" => "Require"
423 "Ed25519.Certificate" => test_pem("client-ed25519-cert.pem"),
424 "Ed25519.PrivateKey" => test_pem("client-ed25519-key.pem"),
425 "MinProtocol" => "TLSv1.2",
426 "MaxProtocol" => "TLSv1.2"
429 "ExpectedClientCertType" => "Ed25519",
430 "ExpectedClientSignType" => "Ed25519",
431 "ExpectedResult" => "Success"
435 name => "TLS 1.2 Ed448 Client Auth",
437 "VerifyCAFile" => test_pem("root-cert.pem"),
438 "VerifyMode" => "Require"
441 "Ed448.Certificate" => test_pem("client-ed448-cert.pem"),
442 "Ed448.PrivateKey" => test_pem("client-ed448-key.pem"),
443 "MinProtocol" => "TLSv1.2",
444 "MaxProtocol" => "TLSv1.2"
447 "ExpectedClientCertType" => "Ed448",
448 "ExpectedClientSignType" => "Ed448",
449 "ExpectedResult" => "Success"
456 name => "RSA-PSS Certificate CipherString Selection",
457 server => $server_pss,
459 "CipherString" => "aRSA",
460 "MaxProtocol" => "TLSv1.2",
463 "ExpectedServerCertType" =>, "RSA-PSS",
464 "ExpectedServerSignType" =>, "RSA-PSS",
465 "ExpectedResult" => "Success"
469 name => "RSA-PSS Certificate Legacy Signature Algorithm Selection",
470 server => $server_pss,
472 "SignatureAlgorithms" => "RSA-PSS+SHA256",
475 "ExpectedServerCertType" => "RSA",
476 "ExpectedServerSignHash" => "SHA256",
477 "ExpectedServerSignType" => "RSA-PSS",
478 "ExpectedResult" => "Success"
482 name => "RSA-PSS Certificate Unified Signature Algorithm Selection",
483 server => $server_pss,
485 "SignatureAlgorithms" => "rsa_pss_pss_sha256",
488 "ExpectedServerCertType" => "RSA-PSS",
489 "ExpectedServerSignHash" => "SHA256",
490 "ExpectedServerSignType" => "RSA-PSS",
491 "ExpectedResult" => "Success"
495 name => "Only RSA-PSS Certificate",
496 server => $server_pss_only,
499 "ExpectedServerCertType" => "RSA-PSS",
500 "ExpectedServerSignHash" => "SHA256",
501 "ExpectedServerSignType" => "RSA-PSS",
502 "ExpectedResult" => "Success"
506 name => "Only RSA-PSS Certificate Valid Signature Algorithms",
507 server => $server_pss_only,
509 "SignatureAlgorithms" => "rsa_pss_pss_sha512",
512 "ExpectedServerCertType" => "RSA-PSS",
513 "ExpectedServerSignHash" => "SHA512",
514 "ExpectedServerSignType" => "RSA-PSS",
515 "ExpectedResult" => "Success"
519 name => "RSA-PSS Certificate, no PSS signature algorithms",
520 server => $server_pss_only,
522 "SignatureAlgorithms" => "RSA+SHA256",
525 "ExpectedResult" => "ServerFail"
529 name => "Only RSA-PSS Restricted Certificate",
530 server => $server_pss_restrict_only,
533 "ExpectedServerCertType" => "RSA-PSS",
534 "ExpectedServerSignHash" => "SHA256",
535 "ExpectedServerSignType" => "RSA-PSS",
536 "ExpectedResult" => "Success"
540 name => "RSA-PSS Restricted Certificate Valid Signature Algorithms",
541 server => $server_pss_restrict_only,
543 "SignatureAlgorithms" => "rsa_pss_pss_sha256:rsa_pss_pss_sha512",
546 "ExpectedServerCertType" => "RSA-PSS",
547 "ExpectedServerSignHash" => "SHA256",
548 "ExpectedServerSignType" => "RSA-PSS",
549 "ExpectedResult" => "Success"
553 name => "RSA-PSS Restricted Cert client prefers invalid Signature Algorithm",
554 server => $server_pss_restrict_only,
556 "SignatureAlgorithms" => "rsa_pss_pss_sha512:rsa_pss_pss_sha256",
559 "ExpectedServerCertType" => "RSA-PSS",
560 "ExpectedServerSignHash" => "SHA256",
561 "ExpectedServerSignType" => "RSA-PSS",
562 "ExpectedResult" => "Success"
566 name => "RSA-PSS Restricted Certificate Invalid Signature Algorithms",
567 server => $server_pss_restrict_only,
569 "SignatureAlgorithms" => "rsa_pss_pss_sha512",
572 "ExpectedResult" => "ServerFail"
576 name => "RSA key exchange with only RSA-PSS certificate",
577 server => $server_pss_only,
579 "CipherString" => "kRSA",
580 "MaxProtocol" => "TLSv1.2",
583 "ExpectedResult" => "ServerFail"
588 my @tests_tls_1_1 = (
590 name => "Only RSA-PSS Certificate, TLS v1.1",
591 server => $server_pss_only,
593 "MaxProtocol" => "TLSv1.1",
596 "ExpectedResult" => "ServerFail"
601 push @tests, @tests_non_fips unless $fips_mode;
603 #TODO(3.0): Re-enable these PSS tests in a $no_deflt_libctx build once we have
605 push @tests, @tests_pss unless $no_deflt_libctx;
606 push @tests, @tests_tls_1_1 unless disabled("tls1_1") || $no_deflt_libctx;
612 "ECDSA.Certificate" => test_pem("server-ecdsa-cert.pem"),
613 "ECDSA.PrivateKey" => test_pem("server-ecdsa-key.pem"),
614 "MinProtocol" => "TLSv1.3",
615 "MaxProtocol" => "TLSv1.3"
619 "ECDSA.Certificate" => test_pem("server-ecdsa-cert.pem"),
620 "ECDSA.PrivateKey" => test_pem("server-ecdsa-key.pem"),
621 "Ed25519.Certificate" => test_pem("server-ed25519-cert.pem"),
622 "Ed25519.PrivateKey" => test_pem("server-ed25519-key.pem"),
623 "Ed448.Certificate" => test_pem("server-ed448-cert.pem"),
624 "Ed448.PrivateKey" => test_pem("server-ed448-key.pem"),
625 "MinProtocol" => "TLSv1.3",
626 "MaxProtocol" => "TLSv1.3"
630 my $client_tls_1_3 = {
631 "RSA.Certificate" => test_pem("ee-client-chain.pem"),
632 "RSA.PrivateKey" => test_pem("ee-key.pem"),
633 "ECDSA.Certificate" => test_pem("ee-ecdsa-client-chain.pem"),
634 "ECDSA.PrivateKey" => test_pem("ee-ecdsa-key.pem"),
635 "MinProtocol" => "TLSv1.3",
636 "MaxProtocol" => "TLSv1.3"
639 my @tests_tls_1_3 = (
641 name => "TLS 1.3 ECDSA Signature Algorithm Selection",
642 server => $server_tls_1_3,
644 "SignatureAlgorithms" => "ECDSA+SHA256",
647 "ExpectedServerCertType" => "P-256",
648 "ExpectedServerSignHash" => "SHA256",
649 "ExpectedServerSignType" => "EC",
650 "ExpectedServerCANames" => "empty",
651 "ExpectedResult" => "Success"
655 name => "TLS 1.3 ECDSA Signature Algorithm Selection compressed point",
657 "ECDSA.Certificate" => test_pem("server-cecdsa-cert.pem"),
658 "ECDSA.PrivateKey" => test_pem("server-cecdsa-key.pem"),
659 "MinProtocol" => "TLSv1.3",
660 "MaxProtocol" => "TLSv1.3"
663 "SignatureAlgorithms" => "ECDSA+SHA256",
666 "ExpectedServerCertType" => "P-256",
667 "ExpectedServerSignHash" => "SHA256",
668 "ExpectedServerSignType" => "EC",
669 "ExpectedServerCANames" => "empty",
670 "ExpectedResult" => "Success"
674 name => "TLS 1.3 ECDSA Signature Algorithm Selection SHA1",
675 server => $server_tls_1_3,
677 "SignatureAlgorithms" => "ECDSA+SHA1",
680 "ExpectedResult" => "ServerFail"
684 name => "TLS 1.3 ECDSA Signature Algorithm Selection with PSS",
685 server => $server_tls_1_3,
687 "SignatureAlgorithms" => "ECDSA+SHA256:RSA-PSS+SHA256",
688 "RequestCAFile" => test_pem("root-cert.pem"),
691 "ExpectedServerCertType" => "P-256",
692 "ExpectedServerSignHash" => "SHA256",
693 "ExpectedServerSignType" => "EC",
694 "ExpectedServerCANames" => test_pem("root-cert.pem"),
695 "ExpectedResult" => "Success"
699 name => "TLS 1.3 RSA Signature Algorithm Selection SHA384 with PSS",
700 server => $server_tls_1_3,
702 "SignatureAlgorithms" => "ECDSA+SHA384:RSA-PSS+SHA384",
705 "ExpectedServerCertType" => "RSA",
706 "ExpectedServerSignHash" => "SHA384",
707 "ExpectedServerSignType" => "RSA-PSS",
708 "ExpectedResult" => "Success"
712 name => "TLS 1.3 ECDSA Signature Algorithm Selection, no ECDSA certificate",
714 "MinProtocol" => "TLSv1.3",
715 "MaxProtocol" => "TLSv1.3"
718 "SignatureAlgorithms" => "ECDSA+SHA256",
721 "ExpectedResult" => "ServerFail"
725 name => "TLS 1.3 RSA Signature Algorithm Selection, no PSS",
726 server => $server_tls_1_3,
728 "SignatureAlgorithms" => "RSA+SHA256",
731 "ExpectedResult" => "ServerFail"
735 name => "TLS 1.3 RSA-PSS Signature Algorithm Selection",
736 server => $server_tls_1_3,
738 "SignatureAlgorithms" => "RSA-PSS+SHA256",
741 "ExpectedServerCertType" => "RSA",
742 "ExpectedServerSignHash" => "SHA256",
743 "ExpectedServerSignType" => "RSA-PSS",
744 "ExpectedResult" => "Success"
748 name => "TLS 1.3 RSA Client Auth Signature Algorithm Selection",
750 "ClientSignatureAlgorithms" => "PSS+SHA256",
751 "VerifyCAFile" => test_pem("root-cert.pem"),
752 "VerifyMode" => "Require"
754 client => $client_tls_1_3,
756 "ExpectedClientCertType" => "RSA",
757 "ExpectedClientSignHash" => "SHA256",
758 "ExpectedClientSignType" => "RSA-PSS",
759 "ExpectedClientCANames" => "empty",
760 "ExpectedResult" => "Success"
764 name => "TLS 1.3 RSA Client Auth Signature Algorithm Selection non-empty CA Names",
766 "ClientSignatureAlgorithms" => "PSS+SHA256",
767 "VerifyCAFile" => test_pem("root-cert.pem"),
768 "RequestCAFile" => test_pem("root-cert.pem"),
769 "VerifyMode" => "Require"
771 client => $client_tls_1_3,
773 "ExpectedClientCertType" => "RSA",
774 "ExpectedClientSignHash" => "SHA256",
775 "ExpectedClientSignType" => "RSA-PSS",
776 "ExpectedClientCANames" => test_pem("root-cert.pem"),
777 "ExpectedResult" => "Success"
781 name => "TLS 1.3 ECDSA Client Auth Signature Algorithm Selection",
783 "ClientSignatureAlgorithms" => "ECDSA+SHA256",
784 "VerifyCAFile" => test_pem("root-cert.pem"),
785 "VerifyMode" => "Require"
787 client => $client_tls_1_3,
789 "ExpectedClientCertType" => "P-256",
790 "ExpectedClientSignHash" => "SHA256",
791 "ExpectedClientSignType" => "EC",
792 "ExpectedResult" => "Success"
797 my @tests_tls_1_3_non_fips = (
799 name => "TLS 1.3 Ed25519 Signature Algorithm Selection",
800 server => $server_tls_1_3,
802 "SignatureAlgorithms" => "ed25519",
805 "ExpectedServerCertType" => "Ed25519",
806 "ExpectedServerSignType" => "Ed25519",
807 "ExpectedResult" => "Success"
811 name => "TLS 1.3 Ed448 Signature Algorithm Selection",
812 server => $server_tls_1_3,
814 "SignatureAlgorithms" => "ed448",
815 "VerifyCAFile" => test_pem("root-ed448-cert.pem"),
818 "ExpectedServerCertType" => "Ed448",
819 "ExpectedServerSignType" => "Ed448",
820 "ExpectedResult" => "Success"
824 name => "TLS 1.3 Ed25519 CipherString and Groups Selection",
825 server => $server_tls_1_3,
827 "SignatureAlgorithms" => "ECDSA+SHA256:ed25519",
828 # Excluding P-256 from the supported groups list should
829 # mean server still uses a P-256 certificate because supported
830 # groups is not used in signature selection for TLS 1.3
834 "ExpectedServerCertType" =>, "P-256",
835 "ExpectedServerSignType" =>, "EC",
836 "ExpectedResult" => "Success"
840 name => "TLS 1.3 Ed448 CipherString and Groups Selection",
841 server => $server_tls_1_3,
843 "SignatureAlgorithms" => "ECDSA+SHA256:ed448",
844 # Excluding P-256 from the supported groups list should
845 # mean server still uses a P-256 certificate because supported
846 # groups is not used in signature selection for TLS 1.3
850 "ExpectedServerCertType" =>, "P-256",
851 "ExpectedServerSignType" =>, "EC",
852 "ExpectedResult" => "Success"
856 name => "TLS 1.3 Ed25519 Client Auth",
858 "VerifyCAFile" => test_pem("root-cert.pem"),
859 "VerifyMode" => "Require"
862 "EdDSA.Certificate" => test_pem("client-ed25519-cert.pem"),
863 "EdDSA.PrivateKey" => test_pem("client-ed25519-key.pem"),
864 "MinProtocol" => "TLSv1.3",
865 "MaxProtocol" => "TLSv1.3"
868 "ExpectedClientCertType" => "Ed25519",
869 "ExpectedClientSignType" => "Ed25519",
870 "ExpectedResult" => "Success"
874 name => "TLS 1.3 Ed448 Client Auth",
876 "VerifyCAFile" => test_pem("root-cert.pem"),
877 "VerifyMode" => "Require"
880 "EdDSA.Certificate" => test_pem("client-ed448-cert.pem"),
881 "EdDSA.PrivateKey" => test_pem("client-ed448-key.pem"),
882 "MinProtocol" => "TLSv1.3",
883 "MaxProtocol" => "TLSv1.3"
886 "ExpectedClientCertType" => "Ed448",
887 "ExpectedClientSignType" => "Ed448",
888 "ExpectedResult" => "Success"
892 name => "TLS 1.3 ECDSA with brainpool",
894 "Certificate" => test_pem("server-ecdsa-brainpoolP256r1-cert.pem"),
895 "PrivateKey" => test_pem("server-ecdsa-brainpoolP256r1-key.pem"),
896 "Groups" => "brainpoolP256r1",
899 "RequestCAFile" => test_pem("root-cert.pem"),
900 "Groups" => "brainpoolP256r1",
901 "MinProtocol" => "TLSv1.3",
902 "MaxProtocol" => "TLSv1.3"
905 "ExpectedResult" => "ServerFail"
910 push @tests, @tests_tls_1_3 unless disabled("tls1_3");
911 push @tests, @tests_tls_1_3_non_fips unless disabled("tls1_3") || $fips_mode;
913 my @tests_dsa_tls_1_2 = (
915 name => "TLS 1.2 DSA Certificate Test",
917 "DSA.Certificate" => test_pem("server-dsa-cert.pem"),
918 "DSA.PrivateKey" => test_pem("server-dsa-key.pem"),
919 "DHParameters" => test_pem("dhp2048.pem"),
920 "MinProtocol" => "TLSv1.2",
921 "MaxProtocol" => "TLSv1.2",
922 "CipherString" => "ALL",
925 "SignatureAlgorithms" => "DSA+SHA256:DSA+SHA1",
926 "CipherString" => "ALL",
929 "ExpectedResult" => "Success"
934 my @tests_dsa_tls_1_3 = (
936 name => "TLS 1.3 Client Auth No TLS 1.3 Signature Algorithms",
938 "ClientSignatureAlgorithms" => "ECDSA+SHA1:DSA+SHA256:RSA+SHA256",
939 "VerifyCAFile" => test_pem("root-cert.pem"),
940 "VerifyMode" => "Request"
944 "ExpectedResult" => "ServerFail"
948 name => "TLS 1.3 DSA Certificate Test",
950 "DSA.Certificate" => test_pem("server-dsa-cert.pem"),
951 "DSA.PrivateKey" => test_pem("server-dsa-key.pem"),
952 "MinProtocol" => "TLSv1.3",
953 "MaxProtocol" => "TLSv1.3",
954 "CipherString" => "ALL",
957 "SignatureAlgorithms" => "DSA+SHA1:DSA+SHA256:ECDSA+SHA256",
958 "CipherString" => "ALL",
961 "ExpectedResult" => "ServerFail"
966 if (!disabled("dsa")) {
967 #TODO(3.0): Temporary workaround for DH issues in FIPS. Needs investigation
968 push @tests, @tests_dsa_tls_1_2 unless disabled("dh") || $fips_mode;
969 push @tests, @tests_dsa_tls_1_3 unless disabled("tls1_3");