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;
602 push @tests, @tests_pss;
603 push @tests, @tests_tls_1_1 unless disabled("tls1_1") || $no_deflt_libctx;
609 "ECDSA.Certificate" => test_pem("server-ecdsa-cert.pem"),
610 "ECDSA.PrivateKey" => test_pem("server-ecdsa-key.pem"),
611 "MinProtocol" => "TLSv1.3",
612 "MaxProtocol" => "TLSv1.3"
616 "ECDSA.Certificate" => test_pem("server-ecdsa-cert.pem"),
617 "ECDSA.PrivateKey" => test_pem("server-ecdsa-key.pem"),
618 "Ed25519.Certificate" => test_pem("server-ed25519-cert.pem"),
619 "Ed25519.PrivateKey" => test_pem("server-ed25519-key.pem"),
620 "Ed448.Certificate" => test_pem("server-ed448-cert.pem"),
621 "Ed448.PrivateKey" => test_pem("server-ed448-key.pem"),
622 "MinProtocol" => "TLSv1.3",
623 "MaxProtocol" => "TLSv1.3"
627 my $client_tls_1_3 = {
628 "RSA.Certificate" => test_pem("ee-client-chain.pem"),
629 "RSA.PrivateKey" => test_pem("ee-key.pem"),
630 "ECDSA.Certificate" => test_pem("ee-ecdsa-client-chain.pem"),
631 "ECDSA.PrivateKey" => test_pem("ee-ecdsa-key.pem"),
632 "MinProtocol" => "TLSv1.3",
633 "MaxProtocol" => "TLSv1.3"
636 my @tests_tls_1_3 = (
638 name => "TLS 1.3 ECDSA Signature Algorithm Selection",
639 server => $server_tls_1_3,
641 "SignatureAlgorithms" => "ECDSA+SHA256",
644 "ExpectedServerCertType" => "P-256",
645 "ExpectedServerSignHash" => "SHA256",
646 "ExpectedServerSignType" => "EC",
647 "ExpectedServerCANames" => "empty",
648 "ExpectedResult" => "Success"
652 name => "TLS 1.3 ECDSA Signature Algorithm Selection compressed point",
654 "ECDSA.Certificate" => test_pem("server-cecdsa-cert.pem"),
655 "ECDSA.PrivateKey" => test_pem("server-cecdsa-key.pem"),
656 "MinProtocol" => "TLSv1.3",
657 "MaxProtocol" => "TLSv1.3"
660 "SignatureAlgorithms" => "ECDSA+SHA256",
663 "ExpectedServerCertType" => "P-256",
664 "ExpectedServerSignHash" => "SHA256",
665 "ExpectedServerSignType" => "EC",
666 "ExpectedServerCANames" => "empty",
667 "ExpectedResult" => "Success"
671 name => "TLS 1.3 ECDSA Signature Algorithm Selection SHA1",
672 server => $server_tls_1_3,
674 "SignatureAlgorithms" => "ECDSA+SHA1",
677 "ExpectedResult" => "ServerFail"
681 name => "TLS 1.3 ECDSA Signature Algorithm Selection with PSS",
682 server => $server_tls_1_3,
684 "SignatureAlgorithms" => "ECDSA+SHA256:RSA-PSS+SHA256",
685 "RequestCAFile" => test_pem("root-cert.pem"),
688 "ExpectedServerCertType" => "P-256",
689 "ExpectedServerSignHash" => "SHA256",
690 "ExpectedServerSignType" => "EC",
691 "ExpectedServerCANames" => test_pem("root-cert.pem"),
692 "ExpectedResult" => "Success"
696 name => "TLS 1.3 RSA Signature Algorithm Selection SHA384 with PSS",
697 server => $server_tls_1_3,
699 "SignatureAlgorithms" => "ECDSA+SHA384:RSA-PSS+SHA384",
702 "ExpectedServerCertType" => "RSA",
703 "ExpectedServerSignHash" => "SHA384",
704 "ExpectedServerSignType" => "RSA-PSS",
705 "ExpectedResult" => "Success"
709 name => "TLS 1.3 ECDSA Signature Algorithm Selection, no ECDSA certificate",
711 "MinProtocol" => "TLSv1.3",
712 "MaxProtocol" => "TLSv1.3"
715 "SignatureAlgorithms" => "ECDSA+SHA256",
718 "ExpectedResult" => "ServerFail"
722 name => "TLS 1.3 RSA Signature Algorithm Selection, no PSS",
723 server => $server_tls_1_3,
725 "SignatureAlgorithms" => "RSA+SHA256",
728 "ExpectedResult" => "ServerFail"
732 name => "TLS 1.3 RSA-PSS Signature Algorithm Selection",
733 server => $server_tls_1_3,
735 "SignatureAlgorithms" => "RSA-PSS+SHA256",
738 "ExpectedServerCertType" => "RSA",
739 "ExpectedServerSignHash" => "SHA256",
740 "ExpectedServerSignType" => "RSA-PSS",
741 "ExpectedResult" => "Success"
745 name => "TLS 1.3 RSA Client Auth Signature Algorithm Selection",
747 "ClientSignatureAlgorithms" => "PSS+SHA256",
748 "VerifyCAFile" => test_pem("root-cert.pem"),
749 "VerifyMode" => "Require"
751 client => $client_tls_1_3,
753 "ExpectedClientCertType" => "RSA",
754 "ExpectedClientSignHash" => "SHA256",
755 "ExpectedClientSignType" => "RSA-PSS",
756 "ExpectedClientCANames" => "empty",
757 "ExpectedResult" => "Success"
761 name => "TLS 1.3 RSA Client Auth Signature Algorithm Selection non-empty CA Names",
763 "ClientSignatureAlgorithms" => "PSS+SHA256",
764 "VerifyCAFile" => test_pem("root-cert.pem"),
765 "RequestCAFile" => test_pem("root-cert.pem"),
766 "VerifyMode" => "Require"
768 client => $client_tls_1_3,
770 "ExpectedClientCertType" => "RSA",
771 "ExpectedClientSignHash" => "SHA256",
772 "ExpectedClientSignType" => "RSA-PSS",
773 "ExpectedClientCANames" => test_pem("root-cert.pem"),
774 "ExpectedResult" => "Success"
778 name => "TLS 1.3 ECDSA Client Auth Signature Algorithm Selection",
780 "ClientSignatureAlgorithms" => "ECDSA+SHA256",
781 "VerifyCAFile" => test_pem("root-cert.pem"),
782 "VerifyMode" => "Require"
784 client => $client_tls_1_3,
786 "ExpectedClientCertType" => "P-256",
787 "ExpectedClientSignHash" => "SHA256",
788 "ExpectedClientSignType" => "EC",
789 "ExpectedResult" => "Success"
794 my @tests_tls_1_3_non_fips = (
796 name => "TLS 1.3 Ed25519 Signature Algorithm Selection",
797 server => $server_tls_1_3,
799 "SignatureAlgorithms" => "ed25519",
802 "ExpectedServerCertType" => "Ed25519",
803 "ExpectedServerSignType" => "Ed25519",
804 "ExpectedResult" => "Success"
808 name => "TLS 1.3 Ed448 Signature Algorithm Selection",
809 server => $server_tls_1_3,
811 "SignatureAlgorithms" => "ed448",
812 "VerifyCAFile" => test_pem("root-ed448-cert.pem"),
815 "ExpectedServerCertType" => "Ed448",
816 "ExpectedServerSignType" => "Ed448",
817 "ExpectedResult" => "Success"
821 name => "TLS 1.3 Ed25519 CipherString and Groups Selection",
822 server => $server_tls_1_3,
824 "SignatureAlgorithms" => "ECDSA+SHA256:ed25519",
825 # Excluding P-256 from the supported groups list should
826 # mean server still uses a P-256 certificate because supported
827 # groups is not used in signature selection for TLS 1.3
831 "ExpectedServerCertType" =>, "P-256",
832 "ExpectedServerSignType" =>, "EC",
833 "ExpectedResult" => "Success"
837 name => "TLS 1.3 Ed448 CipherString and Groups Selection",
838 server => $server_tls_1_3,
840 "SignatureAlgorithms" => "ECDSA+SHA256:ed448",
841 # Excluding P-256 from the supported groups list should
842 # mean server still uses a P-256 certificate because supported
843 # groups is not used in signature selection for TLS 1.3
847 "ExpectedServerCertType" =>, "P-256",
848 "ExpectedServerSignType" =>, "EC",
849 "ExpectedResult" => "Success"
853 name => "TLS 1.3 Ed25519 Client Auth",
855 "VerifyCAFile" => test_pem("root-cert.pem"),
856 "VerifyMode" => "Require"
859 "EdDSA.Certificate" => test_pem("client-ed25519-cert.pem"),
860 "EdDSA.PrivateKey" => test_pem("client-ed25519-key.pem"),
861 "MinProtocol" => "TLSv1.3",
862 "MaxProtocol" => "TLSv1.3"
865 "ExpectedClientCertType" => "Ed25519",
866 "ExpectedClientSignType" => "Ed25519",
867 "ExpectedResult" => "Success"
871 name => "TLS 1.3 Ed448 Client Auth",
873 "VerifyCAFile" => test_pem("root-cert.pem"),
874 "VerifyMode" => "Require"
877 "EdDSA.Certificate" => test_pem("client-ed448-cert.pem"),
878 "EdDSA.PrivateKey" => test_pem("client-ed448-key.pem"),
879 "MinProtocol" => "TLSv1.3",
880 "MaxProtocol" => "TLSv1.3"
883 "ExpectedClientCertType" => "Ed448",
884 "ExpectedClientSignType" => "Ed448",
885 "ExpectedResult" => "Success"
889 name => "TLS 1.3 ECDSA with brainpool",
891 "Certificate" => test_pem("server-ecdsa-brainpoolP256r1-cert.pem"),
892 "PrivateKey" => test_pem("server-ecdsa-brainpoolP256r1-key.pem"),
895 "RequestCAFile" => test_pem("root-cert.pem"),
896 "MinProtocol" => "TLSv1.3",
897 "MaxProtocol" => "TLSv1.3"
900 "ExpectedResult" => "ServerFail"
905 push @tests, @tests_tls_1_3 unless disabled("tls1_3");
906 push @tests, @tests_tls_1_3_non_fips unless disabled("tls1_3") || $fips_mode;
908 my @tests_dsa_tls_1_2 = (
910 name => "TLS 1.2 DSA Certificate Test",
912 "DSA.Certificate" => test_pem("server-dsa-cert.pem"),
913 "DSA.PrivateKey" => test_pem("server-dsa-key.pem"),
914 "DHParameters" => test_pem("dhp2048.pem"),
915 "MinProtocol" => "TLSv1.2",
916 "MaxProtocol" => "TLSv1.2",
917 "CipherString" => "ALL",
920 "SignatureAlgorithms" => "DSA+SHA256:DSA+SHA1",
921 "CipherString" => "ALL",
924 "ExpectedResult" => "Success"
929 my @tests_dsa_tls_1_3 = (
931 name => "TLS 1.3 Client Auth No TLS 1.3 Signature Algorithms",
933 "ClientSignatureAlgorithms" => "ECDSA+SHA1:DSA+SHA256:RSA+SHA256",
934 "VerifyCAFile" => test_pem("root-cert.pem"),
935 "VerifyMode" => "Request"
939 "ExpectedResult" => "ServerFail"
943 name => "TLS 1.3 DSA Certificate Test",
945 "DSA.Certificate" => test_pem("server-dsa-cert.pem"),
946 "DSA.PrivateKey" => test_pem("server-dsa-key.pem"),
947 "MinProtocol" => "TLSv1.3",
948 "MaxProtocol" => "TLSv1.3",
949 "CipherString" => "ALL",
952 "SignatureAlgorithms" => "DSA+SHA1:DSA+SHA256:ECDSA+SHA256",
953 "CipherString" => "ALL",
956 "ExpectedResult" => "ServerFail"
961 if (!disabled("dsa")) {
962 #TODO(3.0): Temporary workaround for DH issues in FIPS. Needs investigation
963 push @tests, @tests_dsa_tls_1_2 unless disabled("dh") || $fips_mode;
964 push @tests, @tests_dsa_tls_1_3 unless disabled("tls1_3");