1 1.1 christos # -*- mode: perl; -*- 2 1.1 christos 3 1.1 christos ## SSL test configurations 4 1.1 christos 5 1.1 christos 6 1.1 christos use strict; 7 1.1 christos use warnings; 8 1.1 christos 9 1.1 christos package ssltests; 10 1.1 christos use OpenSSL::Test::Utils; 11 1.1 christos 12 1.1 christos our $fips_mode; 13 1.1 christos our $no_deflt_libctx; 14 1.1 christos 15 1.1 christos my $server = { 16 1.1 christos "ECDSA.Certificate" => test_pem("server-ecdsa-cert.pem"), 17 1.1 christos "ECDSA.PrivateKey" => test_pem("server-ecdsa-key.pem"), 18 1.1 christos "Ed25519.Certificate" => test_pem("server-ed25519-cert.pem"), 19 1.1 christos "Ed25519.PrivateKey" => test_pem("server-ed25519-key.pem"), 20 1.1 christos "Ed448.Certificate" => test_pem("server-ed448-cert.pem"), 21 1.1 christos "Ed448.PrivateKey" => test_pem("server-ed448-key.pem"), 22 1.1 christos "MaxProtocol" => "TLSv1.2" 23 1.1 christos }; 24 1.1 christos 25 1.1 christos my $server_pss = { 26 1.1 christos "PSS.Certificate" => test_pem("server-pss-cert.pem"), 27 1.1 christos "PSS.PrivateKey" => test_pem("server-pss-key.pem"), 28 1.1 christos "ECDSA.Certificate" => test_pem("server-ecdsa-cert.pem"), 29 1.1 christos "ECDSA.PrivateKey" => test_pem("server-ecdsa-key.pem"), 30 1.1 christos "Ed25519.Certificate" => test_pem("server-ed25519-cert.pem"), 31 1.1 christos "Ed25519.PrivateKey" => test_pem("server-ed25519-key.pem"), 32 1.1 christos "Ed448.Certificate" => test_pem("server-ed448-cert.pem"), 33 1.1 christos "Ed448.PrivateKey" => test_pem("server-ed448-key.pem"), 34 1.1 christos "MaxProtocol" => "TLSv1.2" 35 1.1 christos }; 36 1.1 christos 37 1.1 christos my $server_pss_only = { 38 1.1 christos "Certificate" => test_pem("server-pss-cert.pem"), 39 1.1 christos "PrivateKey" => test_pem("server-pss-key.pem"), 40 1.1 christos }; 41 1.1 christos 42 1.1 christos my $server_pss_restrict_only = { 43 1.1 christos "Certificate" => test_pem("server-pss-restrict-cert.pem"), 44 1.1 christos "PrivateKey" => test_pem("server-pss-restrict-key.pem"), 45 1.1 christos }; 46 1.1 christos 47 1.1 christos my $server_rsa_all; 48 1.1 christos 49 1.1 christos if ($no_deflt_libctx) { 50 1.1 christos $server_rsa_all = { 51 1.1 christos "Certificate" => test_pem("servercert.pem"), 52 1.1 christos "PrivateKey" => test_pem("serverkey.pem"), 53 1.1 christos }; 54 1.1 christos } else { 55 1.1 christos $server_rsa_all = { 56 1.1 christos "PSS.Certificate" => test_pem("server-pss-cert.pem"), 57 1.1 christos "PSS.PrivateKey" => test_pem("server-pss-key.pem"), 58 1.1 christos "Certificate" => test_pem("servercert.pem"), 59 1.1 christos "PrivateKey" => test_pem("serverkey.pem"), 60 1.1 christos }; 61 1.1 christos } 62 1.1 christos 63 1.1 christos our @tests = ( 64 1.1 christos { 65 1.1 christos name => "ECDSA CipherString Selection", 66 1.1 christos server => $server, 67 1.1 christos client => { 68 1.1 christos "CipherString" => "aECDSA", 69 1.1 christos "MaxProtocol" => "TLSv1.2", 70 1.1 christos "RequestCAFile" => test_pem("root-cert.pem"), 71 1.1 christos }, 72 1.1 christos test => { 73 1.1 christos "ExpectedServerCertType" =>, "P-256", 74 1.1 christos "ExpectedServerSignType" =>, "EC", 75 1.1 christos # Note: certificate_authorities not sent for TLS < 1.3 76 1.1 christos "ExpectedServerCANames" =>, "empty", 77 1.1 christos "ExpectedResult" => "Success" 78 1.1 christos }, 79 1.1 christos }, 80 1.1 christos { 81 1.1 christos name => "ECDSA CipherString Selection", 82 1.1 christos server => { 83 1.1 christos "ECDSA.Certificate" => test_pem("server-ecdsa-cert.pem"), 84 1.1 christos "ECDSA.PrivateKey" => test_pem("server-ecdsa-key.pem"), 85 1.1 christos "MaxProtocol" => "TLSv1.2", 86 1.1 christos #Deliberately set supported_groups to one not in the cert. This 87 1.1 christos #should be tolerated 88 1.1 christos "Groups" => "P-384" 89 1.1 christos }, 90 1.1 christos client => { 91 1.1 christos "CipherString" => "aECDSA", 92 1.1 christos "MaxProtocol" => "TLSv1.2", 93 1.1 christos "Groups" => "P-256:P-384", 94 1.1 christos "RequestCAFile" => test_pem("root-cert.pem"), 95 1.1 christos }, 96 1.1 christos test => { 97 1.1 christos "ExpectedServerCertType" =>, "P-256", 98 1.1 christos "ExpectedServerSignType" =>, "EC", 99 1.1 christos # Note: certificate_authorities not sent for TLS < 1.3 100 1.1 christos "ExpectedServerCANames" =>, "empty", 101 1.1 christos "ExpectedResult" => "Success" 102 1.1 christos }, 103 1.1 christos }, 104 1.1 christos { 105 1.1 christos name => "ECDSA CipherString Selection", 106 1.1 christos server => { 107 1.1 christos "ECDSA.Certificate" => test_pem("server-ecdsa-cert.pem"), 108 1.1 christos "ECDSA.PrivateKey" => test_pem("server-ecdsa-key.pem"), 109 1.1 christos "MaxProtocol" => "TLSv1.2", 110 1.1 christos "Groups" => "P-256:P-384" 111 1.1 christos }, 112 1.1 christos client => { 113 1.1 christos "CipherString" => "aECDSA", 114 1.1 christos "MaxProtocol" => "TLSv1.2", 115 1.1 christos #Deliberately set groups to not include the certificate group. This 116 1.1 christos #should fail 117 1.1 christos "Groups" => "P-384", 118 1.1 christos "RequestCAFile" => test_pem("root-cert.pem"), 119 1.1 christos }, 120 1.1 christos test => { 121 1.1 christos "ExpectedResult" => "ServerFail" 122 1.1 christos }, 123 1.1 christos }, 124 1.1 christos { 125 1.1 christos name => "RSA CipherString Selection", 126 1.1 christos server => $server, 127 1.1 christos client => { 128 1.1 christos "CipherString" => "aRSA", 129 1.1 christos "MaxProtocol" => "TLSv1.2", 130 1.1 christos }, 131 1.1 christos test => { 132 1.1 christos "ExpectedServerCertType" =>, "RSA", 133 1.1 christos "ExpectedServerSignType" =>, "RSA-PSS", 134 1.1 christos "ExpectedResult" => "Success" 135 1.1 christos }, 136 1.1 christos }, 137 1.1 christos { 138 1.1 christos name => "P-256 CipherString and Signature Algorithm Selection", 139 1.1 christos server => $server, 140 1.1 christos client => { 141 1.1 christos "CipherString" => "aECDSA", 142 1.1 christos "MaxProtocol" => "TLSv1.2", 143 1.1 christos "SignatureAlgorithms" => "ECDSA+SHA256:ed25519", 144 1.1 christos }, 145 1.1 christos test => { 146 1.1 christos "ExpectedServerCertType" => "P-256", 147 1.1 christos "ExpectedServerSignHash" => "SHA256", 148 1.1 christos "ExpectedServerSignType" => "EC", 149 1.1 christos "ExpectedResult" => "Success" 150 1.1 christos }, 151 1.1 christos }, 152 1.1 christos { 153 1.1 christos name => "ECDSA CipherString Selection, no ECDSA certificate", 154 1.1 christos server => { 155 1.1 christos "MaxProtocol" => "TLSv1.2" 156 1.1 christos }, 157 1.1 christos client => { 158 1.1 christos "CipherString" => "aECDSA", 159 1.1 christos "MaxProtocol" => "TLSv1.2" 160 1.1 christos }, 161 1.1 christos test => { 162 1.1 christos "ExpectedResult" => "ServerFail" 163 1.1 christos }, 164 1.1 christos }, 165 1.1 christos { 166 1.1 christos name => "ECDSA Signature Algorithm Selection", 167 1.1 christos server => $server, 168 1.1 christos client => { 169 1.1 christos "SignatureAlgorithms" => "ECDSA+SHA256", 170 1.1 christos }, 171 1.1 christos test => { 172 1.1 christos "ExpectedServerCertType" => "P-256", 173 1.1 christos "ExpectedServerSignHash" => "SHA256", 174 1.1 christos "ExpectedServerSignType" => "EC", 175 1.1 christos "ExpectedResult" => "Success" 176 1.1 christos }, 177 1.1 christos }, 178 1.1 christos { 179 1.1 christos name => "ECDSA Signature Algorithm Selection SHA384", 180 1.1 christos server => $server, 181 1.1 christos client => { 182 1.1 christos "SignatureAlgorithms" => "ECDSA+SHA384", 183 1.1 christos }, 184 1.1 christos test => { 185 1.1 christos "ExpectedServerCertType" => "P-256", 186 1.1 christos "ExpectedServerSignHash" => "SHA384", 187 1.1 christos "ExpectedServerSignType" => "EC", 188 1.1 christos "ExpectedResult" => "Success" 189 1.1 christos }, 190 1.1 christos }, 191 1.1 christos { 192 1.1 christos name => "ECDSA Signature Algorithm Selection compressed point", 193 1.1 christos server => { 194 1.1 christos "ECDSA.Certificate" => test_pem("server-cecdsa-cert.pem"), 195 1.1 christos "ECDSA.PrivateKey" => test_pem("server-cecdsa-key.pem"), 196 1.1 christos "MaxProtocol" => "TLSv1.2" 197 1.1 christos }, 198 1.1 christos client => { 199 1.1 christos "SignatureAlgorithms" => "ECDSA+SHA256", 200 1.1 christos }, 201 1.1 christos test => { 202 1.1 christos "ExpectedServerCertType" => "P-256", 203 1.1 christos "ExpectedServerSignHash" => "SHA256", 204 1.1 christos "ExpectedServerSignType" => "EC", 205 1.1 christos "ExpectedResult" => "Success" 206 1.1 christos }, 207 1.1 christos }, 208 1.1 christos { 209 1.1 christos name => "ECDSA Signature Algorithm Selection, no ECDSA certificate", 210 1.1 christos server => { 211 1.1 christos "MaxProtocol" => "TLSv1.2" 212 1.1 christos }, 213 1.1 christos client => { 214 1.1 christos "SignatureAlgorithms" => "ECDSA+SHA256", 215 1.1 christos }, 216 1.1 christos test => { 217 1.1 christos "ExpectedResult" => "ServerFail" 218 1.1 christos }, 219 1.1 christos }, 220 1.1 christos { 221 1.1 christos name => "RSA Signature Algorithm Selection", 222 1.1 christos server => $server, 223 1.1 christos client => { 224 1.1 christos "SignatureAlgorithms" => "RSA+SHA256", 225 1.1 christos }, 226 1.1 christos test => { 227 1.1 christos "ExpectedServerCertType" => "RSA", 228 1.1 christos "ExpectedServerSignHash" => "SHA256", 229 1.1 christos "ExpectedServerSignType" => "RSA", 230 1.1 christos "ExpectedResult" => "Success" 231 1.1 christos }, 232 1.1 christos }, 233 1.1 christos { 234 1.1 christos name => "RSA-PSS Signature Algorithm Selection", 235 1.1 christos server => $server, 236 1.1 christos client => { 237 1.1 christos "SignatureAlgorithms" => "RSA-PSS+SHA256", 238 1.1 christos }, 239 1.1 christos test => { 240 1.1 christos "ExpectedServerCertType" => "RSA", 241 1.1 christos "ExpectedServerSignHash" => "SHA256", 242 1.1 christos "ExpectedServerSignType" => "RSA-PSS", 243 1.1 christos "ExpectedResult" => "Success" 244 1.1 christos }, 245 1.1 christos }, 246 1.1 christos { 247 1.1 christos name => "RSA key exchange with all RSA certificate types", 248 1.1 christos server => $server_rsa_all, 249 1.1 christos client => { 250 1.1 christos "CipherString" => "kRSA", 251 1.1 christos "MaxProtocol" => "TLSv1.2", 252 1.1 christos }, 253 1.1 christos test => { 254 1.1 christos "ExpectedServerCertType" =>, "RSA", 255 1.1 christos "ExpectedResult" => "Success" 256 1.1 christos }, 257 1.1 christos }, 258 1.1 christos { 259 1.1 christos name => "Suite B P-256 Hash Algorithm Selection", 260 1.1 christos server => { 261 1.1 christos "ECDSA.Certificate" => test_pem("p256-server-cert.pem"), 262 1.1 christos "ECDSA.PrivateKey" => test_pem("p256-server-key.pem"), 263 1.1 christos "MaxProtocol" => "TLSv1.2", 264 1.1 christos "CipherString" => "SUITEB128" 265 1.1 christos }, 266 1.1 christos client => { 267 1.1 christos "VerifyCAFile" => test_pem("p384-root.pem"), 268 1.1 christos "SignatureAlgorithms" => "ECDSA+SHA384:ECDSA+SHA256" 269 1.1 christos }, 270 1.1 christos test => { 271 1.1 christos "ExpectedServerCertType" => "P-256", 272 1.1 christos "ExpectedServerSignHash" => "SHA256", 273 1.1 christos "ExpectedServerSignType" => "EC", 274 1.1 christos "ExpectedResult" => "Success" 275 1.1 christos }, 276 1.1 christos }, 277 1.1 christos { 278 1.1 christos name => "Suite B P-384 Hash Algorithm Selection", 279 1.1 christos server => { 280 1.1 christos "ECDSA.Certificate" => test_pem("p384-server-cert.pem"), 281 1.1 christos "ECDSA.PrivateKey" => test_pem("p384-server-key.pem"), 282 1.1 christos "MaxProtocol" => "TLSv1.2", 283 1.1 christos "CipherString" => "SUITEB128" 284 1.1 christos }, 285 1.1 christos client => { 286 1.1 christos "VerifyCAFile" => test_pem("p384-root.pem"), 287 1.1 christos "SignatureAlgorithms" => "ECDSA+SHA256:ECDSA+SHA384" 288 1.1 christos }, 289 1.1 christos test => { 290 1.1 christos "ExpectedServerCertType" => "P-384", 291 1.1 christos "ExpectedServerSignHash" => "SHA384", 292 1.1 christos "ExpectedServerSignType" => "EC", 293 1.1 christos "ExpectedResult" => "Success" 294 1.1 christos }, 295 1.1 christos }, 296 1.1 christos { 297 1.1 christos name => "Ed25519 CipherString and Signature Algorithm Selection", 298 1.1 christos server => $server, 299 1.1 christos client => { 300 1.1 christos "CipherString" => "aECDSA", 301 1.1 christos "MaxProtocol" => "TLSv1.2", 302 1.1 christos "SignatureAlgorithms" => "ed25519:ECDSA+SHA256", 303 1.1 christos "RequestCAFile" => test_pem("root-cert.pem"), 304 1.1 christos }, 305 1.1 christos test => { 306 1.1 christos "ExpectedServerCertType" =>, "Ed25519", 307 1.1 christos "ExpectedServerSignType" =>, "Ed25519", 308 1.1 christos # Note: certificate_authorities not sent for TLS < 1.3 309 1.1 christos "ExpectedServerCANames" =>, "empty", 310 1.1 christos "ExpectedResult" => "Success" 311 1.1 christos }, 312 1.1 christos }, 313 1.1 christos { 314 1.1 christos name => "Ed448 CipherString and Signature Algorithm Selection", 315 1.1 christos server => $server, 316 1.1 christos client => { 317 1.1 christos "CipherString" => "aECDSA", 318 1.1 christos "MaxProtocol" => "TLSv1.2", 319 1.1 christos "SignatureAlgorithms" => "ed448:ECDSA+SHA256", 320 1.1 christos "RequestCAFile" => test_pem("root-ed448-cert.pem"), 321 1.1 christos "VerifyCAFile" => test_pem("root-ed448-cert.pem"), 322 1.1 christos }, 323 1.1 christos test => { 324 1.1 christos "ExpectedServerCertType" =>, "Ed448", 325 1.1 christos "ExpectedServerSignType" =>, "Ed448", 326 1.1 christos # Note: certificate_authorities not sent for TLS < 1.3 327 1.1 christos "ExpectedServerCANames" =>, "empty", 328 1.1 christos "ExpectedResult" => "Success" 329 1.1 christos }, 330 1.1 christos }, 331 1.1 christos { 332 1.1 christos name => "TLS 1.2 Ed25519 Client Auth", 333 1.1 christos server => { 334 1.1 christos "VerifyCAFile" => test_pem("root-cert.pem"), 335 1.1 christos "VerifyMode" => "Require" 336 1.1 christos }, 337 1.1 christos client => { 338 1.1 christos "Ed25519.Certificate" => test_pem("client-ed25519-cert.pem"), 339 1.1 christos "Ed25519.PrivateKey" => test_pem("client-ed25519-key.pem"), 340 1.1 christos "MinProtocol" => "TLSv1.2", 341 1.1 christos "MaxProtocol" => "TLSv1.2" 342 1.1 christos }, 343 1.1 christos test => { 344 1.1 christos "ExpectedClientCertType" => "Ed25519", 345 1.1 christos "ExpectedClientSignType" => "Ed25519", 346 1.1 christos "ExpectedResult" => "Success" 347 1.1 christos }, 348 1.1 christos }, 349 1.1 christos { 350 1.1 christos name => "TLS 1.2 Ed448 Client Auth", 351 1.1 christos server => { 352 1.1 christos "VerifyCAFile" => test_pem("root-cert.pem"), 353 1.1 christos "VerifyMode" => "Require" 354 1.1 christos }, 355 1.1 christos client => { 356 1.1 christos "Ed448.Certificate" => test_pem("client-ed448-cert.pem"), 357 1.1 christos "Ed448.PrivateKey" => test_pem("client-ed448-key.pem"), 358 1.1 christos "MinProtocol" => "TLSv1.2", 359 1.1 christos "MaxProtocol" => "TLSv1.2" 360 1.1 christos }, 361 1.1 christos test => { 362 1.1 christos "ExpectedClientCertType" => "Ed448", 363 1.1 christos "ExpectedClientSignType" => "Ed448", 364 1.1 christos "ExpectedResult" => "Success" 365 1.1 christos }, 366 1.1 christos }, 367 1.1 christos ); 368 1.1 christos 369 1.1 christos my @tests_non_fips = ( 370 1.1 christos { 371 1.1 christos name => "ECDSA Signature Algorithm Selection SHA1", 372 1.1 christos server => { 373 1.1 christos "CipherString" => "DEFAULT:\@SECLEVEL=0", 374 1.1 christos "ECDSA.Certificate" => test_pem("server-ecdsa-cert.pem"), 375 1.1 christos "ECDSA.PrivateKey" => test_pem("server-ecdsa-key.pem"), 376 1.1 christos "Ed25519.Certificate" => test_pem("server-ed25519-cert.pem"), 377 1.1 christos "Ed25519.PrivateKey" => test_pem("server-ed25519-key.pem"), 378 1.1 christos "Ed448.Certificate" => test_pem("server-ed448-cert.pem"), 379 1.1 christos "Ed448.PrivateKey" => test_pem("server-ed448-key.pem"), 380 1.1 christos "MaxProtocol" => "TLSv1.2" 381 1.1 christos }, 382 1.1 christos client => { 383 1.1 christos "CipherString" => "DEFAULT:\@SECLEVEL=0", 384 1.1 christos "SignatureAlgorithms" => "ECDSA+SHA1", 385 1.1 christos }, 386 1.1 christos test => { 387 1.1 christos "ExpectedServerCertType" => "P-256", 388 1.1 christos "ExpectedServerSignHash" => "SHA1", 389 1.1 christos "ExpectedServerSignType" => "EC", 390 1.1 christos "ExpectedResult" => "Success" 391 1.1 christos }, 392 1.1 christos }, 393 1.1 christos { 394 1.1 christos name => "ECDSA with brainpool", 395 1.1 christos server => { 396 1.1 christos "Certificate" => test_pem("server-ecdsa-brainpoolP256r1-cert.pem"), 397 1.1 christos "PrivateKey" => test_pem("server-ecdsa-brainpoolP256r1-key.pem"), 398 1.1 christos "Groups" => "brainpoolP256r1", 399 1.1 christos }, 400 1.1 christos client => { 401 1.1 christos "MaxProtocol" => "TLSv1.2", 402 1.1 christos "CipherString" => "aECDSA", 403 1.1 christos "RequestCAFile" => test_pem("root-cert.pem"), 404 1.1 christos "Groups" => "brainpoolP256r1", 405 1.1 christos }, 406 1.1 christos test => { 407 1.1 christos "ExpectedServerCertType" =>, "brainpoolP256r1", 408 1.1 christos "ExpectedServerSignType" =>, "EC", 409 1.1 christos # Note: certificate_authorities not sent for TLS < 1.3 410 1.1 christos "ExpectedServerCANames" =>, "empty", 411 1.1 christos "ExpectedResult" => "Success" 412 1.1 christos }, 413 1.1 christos }, 414 1.1.1.2 christos { 415 1.1.1.2 christos name => "Ed25519 CipherString and Curves Selection", 416 1.1.1.2 christos server => $server, 417 1.1.1.2 christos client => { 418 1.1.1.2 christos "CipherString" => "aECDSA", 419 1.1.1.2 christos "MaxProtocol" => "TLSv1.2", 420 1.1.1.2 christos "SignatureAlgorithms" => "ECDSA+SHA256:ed25519", 421 1.1.1.2 christos # Excluding P-256 from the supported curves list means server 422 1.1.1.2 christos # certificate should be Ed25519 and not P-256 423 1.1.1.2 christos "Curves" => "X25519" 424 1.1.1.2 christos }, 425 1.1.1.2 christos test => { 426 1.1.1.2 christos "ExpectedServerCertType" =>, "Ed25519", 427 1.1.1.2 christos "ExpectedServerSignType" =>, "Ed25519", 428 1.1.1.2 christos "ExpectedResult" => "Success" 429 1.1.1.2 christos }, 430 1.1.1.2 christos }, 431 1.1.1.2 christos { 432 1.1.1.2 christos name => "Ed448 CipherString and Curves Selection", 433 1.1.1.2 christos server => $server, 434 1.1.1.2 christos client => { 435 1.1.1.2 christos "CipherString" => "aECDSA", 436 1.1.1.2 christos "MaxProtocol" => "TLSv1.2", 437 1.1.1.2 christos "SignatureAlgorithms" => "ECDSA+SHA256:ed448", 438 1.1.1.2 christos "VerifyCAFile" => test_pem("root-ed448-cert.pem"), 439 1.1.1.2 christos # Excluding P-256 from the supported curves list means server 440 1.1.1.2 christos # certificate should be Ed25519 and not P-256 441 1.1.1.2 christos "Curves" => "X448" 442 1.1.1.2 christos }, 443 1.1.1.2 christos test => { 444 1.1.1.2 christos "ExpectedServerCertType" =>, "Ed448", 445 1.1.1.2 christos "ExpectedServerSignType" =>, "Ed448", 446 1.1.1.2 christos "ExpectedResult" => "Success" 447 1.1.1.2 christos }, 448 1.1.1.2 christos }, 449 1.1 christos ); 450 1.1 christos 451 1.1 christos my @tests_pss = ( 452 1.1 christos { 453 1.1 christos name => "RSA-PSS Certificate CipherString Selection", 454 1.1 christos server => $server_pss, 455 1.1 christos client => { 456 1.1 christos "CipherString" => "aRSA", 457 1.1 christos "MaxProtocol" => "TLSv1.2", 458 1.1 christos }, 459 1.1 christos test => { 460 1.1 christos "ExpectedServerCertType" =>, "RSA-PSS", 461 1.1 christos "ExpectedServerSignType" =>, "RSA-PSS", 462 1.1 christos "ExpectedResult" => "Success" 463 1.1 christos }, 464 1.1 christos }, 465 1.1 christos { 466 1.1 christos name => "RSA-PSS Certificate Legacy Signature Algorithm Selection", 467 1.1 christos server => $server_pss, 468 1.1 christos client => { 469 1.1 christos "SignatureAlgorithms" => "RSA-PSS+SHA256", 470 1.1 christos }, 471 1.1 christos test => { 472 1.1 christos "ExpectedServerCertType" => "RSA", 473 1.1 christos "ExpectedServerSignHash" => "SHA256", 474 1.1 christos "ExpectedServerSignType" => "RSA-PSS", 475 1.1 christos "ExpectedResult" => "Success" 476 1.1 christos }, 477 1.1 christos }, 478 1.1 christos { 479 1.1 christos name => "RSA-PSS Certificate Unified Signature Algorithm Selection", 480 1.1 christos server => $server_pss, 481 1.1 christos client => { 482 1.1 christos "SignatureAlgorithms" => "rsa_pss_pss_sha256", 483 1.1 christos }, 484 1.1 christos test => { 485 1.1 christos "ExpectedServerCertType" => "RSA-PSS", 486 1.1 christos "ExpectedServerSignHash" => "SHA256", 487 1.1 christos "ExpectedServerSignType" => "RSA-PSS", 488 1.1 christos "ExpectedResult" => "Success" 489 1.1 christos }, 490 1.1 christos }, 491 1.1 christos { 492 1.1 christos name => "Only RSA-PSS Certificate", 493 1.1 christos server => $server_pss_only, 494 1.1 christos client => {}, 495 1.1 christos test => { 496 1.1 christos "ExpectedServerCertType" => "RSA-PSS", 497 1.1 christos "ExpectedServerSignHash" => "SHA256", 498 1.1 christos "ExpectedServerSignType" => "RSA-PSS", 499 1.1 christos "ExpectedResult" => "Success" 500 1.1 christos }, 501 1.1 christos }, 502 1.1 christos { 503 1.1 christos name => "Only RSA-PSS Certificate Valid Signature Algorithms", 504 1.1 christos server => $server_pss_only, 505 1.1 christos client => { 506 1.1 christos "SignatureAlgorithms" => "rsa_pss_pss_sha512", 507 1.1 christos }, 508 1.1 christos test => { 509 1.1 christos "ExpectedServerCertType" => "RSA-PSS", 510 1.1 christos "ExpectedServerSignHash" => "SHA512", 511 1.1 christos "ExpectedServerSignType" => "RSA-PSS", 512 1.1 christos "ExpectedResult" => "Success" 513 1.1 christos }, 514 1.1 christos }, 515 1.1 christos { 516 1.1 christos name => "RSA-PSS Certificate, no PSS signature algorithms", 517 1.1 christos server => $server_pss_only, 518 1.1 christos client => { 519 1.1 christos "SignatureAlgorithms" => "RSA+SHA256", 520 1.1 christos }, 521 1.1 christos test => { 522 1.1 christos "ExpectedResult" => "ServerFail" 523 1.1 christos }, 524 1.1 christos }, 525 1.1 christos { 526 1.1 christos name => "Only RSA-PSS Restricted Certificate", 527 1.1 christos server => $server_pss_restrict_only, 528 1.1 christos client => {}, 529 1.1 christos test => { 530 1.1 christos "ExpectedServerCertType" => "RSA-PSS", 531 1.1 christos "ExpectedServerSignHash" => "SHA256", 532 1.1 christos "ExpectedServerSignType" => "RSA-PSS", 533 1.1 christos "ExpectedResult" => "Success" 534 1.1 christos }, 535 1.1 christos }, 536 1.1 christos { 537 1.1 christos name => "RSA-PSS Restricted Certificate Valid Signature Algorithms", 538 1.1 christos server => $server_pss_restrict_only, 539 1.1 christos client => { 540 1.1 christos "SignatureAlgorithms" => "rsa_pss_pss_sha256:rsa_pss_pss_sha512", 541 1.1 christos }, 542 1.1 christos test => { 543 1.1 christos "ExpectedServerCertType" => "RSA-PSS", 544 1.1 christos "ExpectedServerSignHash" => "SHA256", 545 1.1 christos "ExpectedServerSignType" => "RSA-PSS", 546 1.1 christos "ExpectedResult" => "Success" 547 1.1 christos }, 548 1.1 christos }, 549 1.1 christos { 550 1.1 christos name => "RSA-PSS Restricted Cert client prefers invalid Signature Algorithm", 551 1.1 christos server => $server_pss_restrict_only, 552 1.1 christos client => { 553 1.1 christos "SignatureAlgorithms" => "rsa_pss_pss_sha512:rsa_pss_pss_sha256", 554 1.1 christos }, 555 1.1 christos test => { 556 1.1 christos "ExpectedServerCertType" => "RSA-PSS", 557 1.1 christos "ExpectedServerSignHash" => "SHA256", 558 1.1 christos "ExpectedServerSignType" => "RSA-PSS", 559 1.1 christos "ExpectedResult" => "Success" 560 1.1 christos }, 561 1.1 christos }, 562 1.1 christos { 563 1.1 christos name => "RSA-PSS Restricted Certificate Invalid Signature Algorithms", 564 1.1 christos server => $server_pss_restrict_only, 565 1.1 christos client => { 566 1.1 christos "SignatureAlgorithms" => "rsa_pss_pss_sha512", 567 1.1 christos }, 568 1.1 christos test => { 569 1.1 christos "ExpectedResult" => "ServerFail" 570 1.1 christos }, 571 1.1 christos }, 572 1.1 christos { 573 1.1 christos name => "RSA key exchange with only RSA-PSS certificate", 574 1.1 christos server => $server_pss_only, 575 1.1 christos client => { 576 1.1 christos "CipherString" => "kRSA", 577 1.1 christos "MaxProtocol" => "TLSv1.2", 578 1.1 christos }, 579 1.1 christos test => { 580 1.1 christos "ExpectedResult" => "ServerFail" 581 1.1 christos }, 582 1.1 christos }, 583 1.1 christos ); 584 1.1 christos 585 1.1 christos my @tests_tls_1_1 = ( 586 1.1 christos { 587 1.1 christos name => "Only RSA-PSS Certificate, TLS v1.1", 588 1.1 christos server => $server_pss_only, 589 1.1 christos client => { 590 1.1 christos "MaxProtocol" => "TLSv1.1", 591 1.1 christos }, 592 1.1 christos test => { 593 1.1 christos "ExpectedResult" => "ServerFail" 594 1.1 christos }, 595 1.1 christos }, 596 1.1 christos ); 597 1.1 christos 598 1.1 christos push @tests, @tests_non_fips unless $fips_mode; 599 1.1 christos push @tests, @tests_pss; 600 1.1 christos push @tests, @tests_tls_1_1 unless disabled("tls1_1") || $no_deflt_libctx; 601 1.1 christos 602 1.1 christos my $server_tls_1_3; 603 1.1 christos 604 1.1 christos if ($fips_mode) { 605 1.1 christos $server_tls_1_3 = { 606 1.1 christos "ECDSA.Certificate" => test_pem("server-ecdsa-cert.pem"), 607 1.1 christos "ECDSA.PrivateKey" => test_pem("server-ecdsa-key.pem"), 608 1.1 christos "MinProtocol" => "TLSv1.3", 609 1.1 christos "MaxProtocol" => "TLSv1.3" 610 1.1 christos }; 611 1.1 christos } else { 612 1.1 christos $server_tls_1_3 = { 613 1.1 christos "ECDSA.Certificate" => test_pem("server-ecdsa-cert.pem"), 614 1.1 christos "ECDSA.PrivateKey" => test_pem("server-ecdsa-key.pem"), 615 1.1 christos "Ed25519.Certificate" => test_pem("server-ed25519-cert.pem"), 616 1.1 christos "Ed25519.PrivateKey" => test_pem("server-ed25519-key.pem"), 617 1.1 christos "Ed448.Certificate" => test_pem("server-ed448-cert.pem"), 618 1.1 christos "Ed448.PrivateKey" => test_pem("server-ed448-key.pem"), 619 1.1 christos "MinProtocol" => "TLSv1.3", 620 1.1 christos "MaxProtocol" => "TLSv1.3" 621 1.1 christos }; 622 1.1 christos } 623 1.1 christos 624 1.1 christos my $client_tls_1_3 = { 625 1.1 christos "RSA.Certificate" => test_pem("ee-client-chain.pem"), 626 1.1 christos "RSA.PrivateKey" => test_pem("ee-key.pem"), 627 1.1 christos "ECDSA.Certificate" => test_pem("ee-ecdsa-client-chain.pem"), 628 1.1 christos "ECDSA.PrivateKey" => test_pem("ee-ecdsa-key.pem"), 629 1.1 christos "MinProtocol" => "TLSv1.3", 630 1.1 christos "MaxProtocol" => "TLSv1.3" 631 1.1 christos }; 632 1.1 christos 633 1.1 christos my @tests_tls_1_3 = ( 634 1.1 christos { 635 1.1 christos name => "TLS 1.3 ECDSA Signature Algorithm Selection", 636 1.1 christos server => $server_tls_1_3, 637 1.1 christos client => { 638 1.1 christos "SignatureAlgorithms" => "ECDSA+SHA256", 639 1.1 christos }, 640 1.1 christos test => { 641 1.1 christos "ExpectedServerCertType" => "P-256", 642 1.1 christos "ExpectedServerSignHash" => "SHA256", 643 1.1 christos "ExpectedServerSignType" => "EC", 644 1.1 christos "ExpectedServerCANames" => "empty", 645 1.1 christos "ExpectedResult" => "Success" 646 1.1 christos }, 647 1.1 christos }, 648 1.1 christos { 649 1.1 christos name => "TLS 1.3 ECDSA Signature Algorithm Selection compressed point", 650 1.1 christos server => { 651 1.1 christos "ECDSA.Certificate" => test_pem("server-cecdsa-cert.pem"), 652 1.1 christos "ECDSA.PrivateKey" => test_pem("server-cecdsa-key.pem"), 653 1.1 christos "MinProtocol" => "TLSv1.3", 654 1.1 christos "MaxProtocol" => "TLSv1.3" 655 1.1 christos }, 656 1.1 christos client => { 657 1.1 christos "SignatureAlgorithms" => "ECDSA+SHA256", 658 1.1 christos }, 659 1.1 christos test => { 660 1.1 christos "ExpectedServerCertType" => "P-256", 661 1.1 christos "ExpectedServerSignHash" => "SHA256", 662 1.1 christos "ExpectedServerSignType" => "EC", 663 1.1 christos "ExpectedServerCANames" => "empty", 664 1.1 christos "ExpectedResult" => "Success" 665 1.1 christos }, 666 1.1 christos }, 667 1.1 christos { 668 1.1 christos name => "TLS 1.3 ECDSA Signature Algorithm Selection SHA1", 669 1.1 christos server => { 670 1.1 christos "CipherString" => "DEFAULT:\@SECLEVEL=0", 671 1.1 christos "ECDSA.Certificate" => test_pem("server-ecdsa-cert.pem"), 672 1.1 christos "ECDSA.PrivateKey" => test_pem("server-ecdsa-key.pem"), 673 1.1 christos "Ed25519.Certificate" => test_pem("server-ed25519-cert.pem"), 674 1.1 christos "Ed25519.PrivateKey" => test_pem("server-ed25519-key.pem"), 675 1.1 christos "Ed448.Certificate" => test_pem("server-ed448-cert.pem"), 676 1.1 christos "Ed448.PrivateKey" => test_pem("server-ed448-key.pem"), 677 1.1 christos "MinProtocol" => "TLSv1.3", 678 1.1 christos "MaxProtocol" => "TLSv1.3" 679 1.1 christos }, 680 1.1 christos client => { 681 1.1 christos "CipherString" => "DEFAULT:\@SECLEVEL=0", 682 1.1 christos "SignatureAlgorithms" => "ECDSA+SHA1", 683 1.1 christos }, 684 1.1 christos test => { 685 1.1 christos "ExpectedResult" => "ServerFail" 686 1.1 christos }, 687 1.1 christos }, 688 1.1 christos { 689 1.1 christos name => "TLS 1.3 ECDSA Signature Algorithm Selection with PSS", 690 1.1 christos server => $server_tls_1_3, 691 1.1 christos client => { 692 1.1 christos "SignatureAlgorithms" => "ECDSA+SHA256:RSA-PSS+SHA256", 693 1.1 christos "RequestCAFile" => test_pem("root-cert.pem"), 694 1.1 christos }, 695 1.1 christos test => { 696 1.1 christos "ExpectedServerCertType" => "P-256", 697 1.1 christos "ExpectedServerSignHash" => "SHA256", 698 1.1 christos "ExpectedServerSignType" => "EC", 699 1.1 christos "ExpectedServerCANames" => test_pem("root-cert.pem"), 700 1.1 christos "ExpectedResult" => "Success" 701 1.1 christos }, 702 1.1 christos }, 703 1.1 christos { 704 1.1 christos name => "TLS 1.3 RSA Signature Algorithm Selection SHA384 with PSS", 705 1.1 christos server => $server_tls_1_3, 706 1.1 christos client => { 707 1.1 christos "SignatureAlgorithms" => "ECDSA+SHA384:RSA-PSS+SHA384", 708 1.1 christos }, 709 1.1 christos test => { 710 1.1 christos "ExpectedServerCertType" => "RSA", 711 1.1 christos "ExpectedServerSignHash" => "SHA384", 712 1.1 christos "ExpectedServerSignType" => "RSA-PSS", 713 1.1 christos "ExpectedResult" => "Success" 714 1.1 christos }, 715 1.1 christos }, 716 1.1 christos { 717 1.1 christos name => "TLS 1.3 ECDSA Signature Algorithm Selection, no ECDSA certificate", 718 1.1 christos server => { 719 1.1 christos "MinProtocol" => "TLSv1.3", 720 1.1 christos "MaxProtocol" => "TLSv1.3" 721 1.1 christos }, 722 1.1 christos client => { 723 1.1 christos "SignatureAlgorithms" => "ECDSA+SHA256", 724 1.1 christos }, 725 1.1 christos test => { 726 1.1 christos "ExpectedResult" => "ServerFail" 727 1.1 christos }, 728 1.1 christos }, 729 1.1 christos { 730 1.1 christos name => "TLS 1.3 RSA Signature Algorithm Selection, no PSS", 731 1.1 christos server => $server_tls_1_3, 732 1.1 christos client => { 733 1.1 christos "SignatureAlgorithms" => "RSA+SHA256", 734 1.1 christos }, 735 1.1 christos test => { 736 1.1 christos "ExpectedResult" => "ServerFail" 737 1.1 christos }, 738 1.1 christos }, 739 1.1 christos { 740 1.1 christos name => "TLS 1.3 RSA-PSS Signature Algorithm Selection", 741 1.1 christos server => $server_tls_1_3, 742 1.1 christos client => { 743 1.1 christos "SignatureAlgorithms" => "RSA-PSS+SHA256", 744 1.1 christos }, 745 1.1 christos test => { 746 1.1 christos "ExpectedServerCertType" => "RSA", 747 1.1 christos "ExpectedServerSignHash" => "SHA256", 748 1.1 christos "ExpectedServerSignType" => "RSA-PSS", 749 1.1 christos "ExpectedResult" => "Success" 750 1.1 christos }, 751 1.1 christos }, 752 1.1 christos { 753 1.1 christos name => "TLS 1.3 RSA Client Auth Signature Algorithm Selection", 754 1.1 christos server => { 755 1.1 christos "ClientSignatureAlgorithms" => "PSS+SHA256", 756 1.1 christos "VerifyCAFile" => test_pem("root-cert.pem"), 757 1.1 christos "VerifyMode" => "Require" 758 1.1 christos }, 759 1.1 christos client => $client_tls_1_3, 760 1.1 christos test => { 761 1.1 christos "ExpectedClientCertType" => "RSA", 762 1.1 christos "ExpectedClientSignHash" => "SHA256", 763 1.1 christos "ExpectedClientSignType" => "RSA-PSS", 764 1.1 christos "ExpectedClientCANames" => "empty", 765 1.1 christos "ExpectedResult" => "Success" 766 1.1 christos }, 767 1.1 christos }, 768 1.1 christos { 769 1.1 christos name => "TLS 1.3 RSA Client Auth Signature Algorithm Selection non-empty CA Names", 770 1.1 christos server => { 771 1.1 christos "ClientSignatureAlgorithms" => "PSS+SHA256", 772 1.1 christos "VerifyCAFile" => test_pem("root-cert.pem"), 773 1.1 christos "RequestCAFile" => test_pem("root-cert.pem"), 774 1.1 christos "VerifyMode" => "Require" 775 1.1 christos }, 776 1.1 christos client => $client_tls_1_3, 777 1.1 christos test => { 778 1.1 christos "ExpectedClientCertType" => "RSA", 779 1.1 christos "ExpectedClientSignHash" => "SHA256", 780 1.1 christos "ExpectedClientSignType" => "RSA-PSS", 781 1.1 christos "ExpectedClientCANames" => test_pem("root-cert.pem"), 782 1.1 christos "ExpectedResult" => "Success" 783 1.1 christos }, 784 1.1 christos }, 785 1.1 christos { 786 1.1 christos name => "TLS 1.3 ECDSA Client Auth Signature Algorithm Selection", 787 1.1 christos server => { 788 1.1 christos "ClientSignatureAlgorithms" => "ECDSA+SHA256", 789 1.1 christos "VerifyCAFile" => test_pem("root-cert.pem"), 790 1.1 christos "VerifyMode" => "Require" 791 1.1 christos }, 792 1.1 christos client => $client_tls_1_3, 793 1.1 christos test => { 794 1.1 christos "ExpectedClientCertType" => "P-256", 795 1.1 christos "ExpectedClientSignHash" => "SHA256", 796 1.1 christos "ExpectedClientSignType" => "EC", 797 1.1 christos "ExpectedResult" => "Success" 798 1.1 christos }, 799 1.1 christos }, 800 1.1 christos ); 801 1.1 christos 802 1.1 christos my @tests_tls_1_3_non_fips = ( 803 1.1 christos { 804 1.1 christos name => "TLS 1.3 Ed25519 Signature Algorithm Selection", 805 1.1 christos server => $server_tls_1_3, 806 1.1 christos client => { 807 1.1 christos "SignatureAlgorithms" => "ed25519", 808 1.1 christos }, 809 1.1 christos test => { 810 1.1 christos "ExpectedServerCertType" => "Ed25519", 811 1.1 christos "ExpectedServerSignType" => "Ed25519", 812 1.1 christos "ExpectedResult" => "Success" 813 1.1 christos }, 814 1.1 christos }, 815 1.1 christos { 816 1.1 christos name => "TLS 1.3 Ed448 Signature Algorithm Selection", 817 1.1 christos server => $server_tls_1_3, 818 1.1 christos client => { 819 1.1 christos "SignatureAlgorithms" => "ed448", 820 1.1 christos "VerifyCAFile" => test_pem("root-ed448-cert.pem"), 821 1.1 christos }, 822 1.1 christos test => { 823 1.1 christos "ExpectedServerCertType" => "Ed448", 824 1.1 christos "ExpectedServerSignType" => "Ed448", 825 1.1 christos "ExpectedResult" => "Success" 826 1.1 christos }, 827 1.1 christos }, 828 1.1 christos { 829 1.1 christos name => "TLS 1.3 Ed25519 CipherString and Groups Selection", 830 1.1 christos server => $server_tls_1_3, 831 1.1 christos client => { 832 1.1 christos "SignatureAlgorithms" => "ECDSA+SHA256:ed25519", 833 1.1 christos # Excluding P-256 from the supported groups list should 834 1.1 christos # mean server still uses a P-256 certificate because supported 835 1.1 christos # groups is not used in signature selection for TLS 1.3 836 1.1 christos "Groups" => "X25519" 837 1.1 christos }, 838 1.1 christos test => { 839 1.1 christos "ExpectedServerCertType" =>, "P-256", 840 1.1 christos "ExpectedServerSignType" =>, "EC", 841 1.1 christos "ExpectedResult" => "Success" 842 1.1 christos }, 843 1.1 christos }, 844 1.1 christos { 845 1.1 christos name => "TLS 1.3 Ed448 CipherString and Groups Selection", 846 1.1 christos server => $server_tls_1_3, 847 1.1 christos client => { 848 1.1 christos "SignatureAlgorithms" => "ECDSA+SHA256:ed448", 849 1.1 christos # Excluding P-256 from the supported groups list should 850 1.1 christos # mean server still uses a P-256 certificate because supported 851 1.1 christos # groups is not used in signature selection for TLS 1.3 852 1.1 christos "Groups" => "X448" 853 1.1 christos }, 854 1.1 christos test => { 855 1.1 christos "ExpectedServerCertType" =>, "P-256", 856 1.1 christos "ExpectedServerSignType" =>, "EC", 857 1.1 christos "ExpectedResult" => "Success" 858 1.1 christos }, 859 1.1 christos }, 860 1.1 christos { 861 1.1 christos name => "TLS 1.3 Ed25519 Client Auth", 862 1.1 christos server => { 863 1.1 christos "VerifyCAFile" => test_pem("root-cert.pem"), 864 1.1 christos "VerifyMode" => "Require" 865 1.1 christos }, 866 1.1 christos client => { 867 1.1 christos "EdDSA.Certificate" => test_pem("client-ed25519-cert.pem"), 868 1.1 christos "EdDSA.PrivateKey" => test_pem("client-ed25519-key.pem"), 869 1.1 christos "MinProtocol" => "TLSv1.3", 870 1.1 christos "MaxProtocol" => "TLSv1.3" 871 1.1 christos }, 872 1.1 christos test => { 873 1.1 christos "ExpectedClientCertType" => "Ed25519", 874 1.1 christos "ExpectedClientSignType" => "Ed25519", 875 1.1 christos "ExpectedResult" => "Success" 876 1.1 christos }, 877 1.1 christos }, 878 1.1 christos { 879 1.1 christos name => "TLS 1.3 Ed448 Client Auth", 880 1.1 christos server => { 881 1.1 christos "VerifyCAFile" => test_pem("root-cert.pem"), 882 1.1 christos "VerifyMode" => "Require" 883 1.1 christos }, 884 1.1 christos client => { 885 1.1 christos "EdDSA.Certificate" => test_pem("client-ed448-cert.pem"), 886 1.1 christos "EdDSA.PrivateKey" => test_pem("client-ed448-key.pem"), 887 1.1 christos "MinProtocol" => "TLSv1.3", 888 1.1 christos "MaxProtocol" => "TLSv1.3" 889 1.1 christos }, 890 1.1 christos test => { 891 1.1 christos "ExpectedClientCertType" => "Ed448", 892 1.1 christos "ExpectedClientSignType" => "Ed448", 893 1.1 christos "ExpectedResult" => "Success" 894 1.1 christos }, 895 1.1 christos }, 896 1.1 christos { 897 1.1 christos name => "TLS 1.3 ECDSA with brainpool but no suitable groups", 898 1.1 christos server => { 899 1.1 christos "Certificate" => test_pem("server-ecdsa-brainpoolP256r1-cert.pem"), 900 1.1 christos "PrivateKey" => test_pem("server-ecdsa-brainpoolP256r1-key.pem"), 901 1.1 christos "Groups" => "brainpoolP256r1", 902 1.1 christos }, 903 1.1 christos client => { 904 1.1 christos "CipherString" => "aECDSA", 905 1.1 christos "RequestCAFile" => test_pem("root-cert.pem"), 906 1.1 christos "Groups" => "brainpoolP256r1", 907 1.1 christos }, 908 1.1 christos test => { 909 1.1 christos #We only configured brainpoolP256r1 on the client side, but TLSv1.3 910 1.1 christos #is enabled and this group is not allowed in TLSv1.3. Therefore this 911 1.1 christos #should fail 912 1.1 christos "ExpectedResult" => "ClientFail" 913 1.1 christos }, 914 1.1 christos }, 915 1.1 christos { 916 1.1 christos name => "TLS 1.3 ECDSA with brainpool", 917 1.1 christos server => { 918 1.1 christos "Certificate" => test_pem("server-ecdsa-brainpoolP256r1-cert.pem"), 919 1.1 christos "PrivateKey" => test_pem("server-ecdsa-brainpoolP256r1-key.pem"), 920 1.1 christos }, 921 1.1 christos client => { 922 1.1 christos "RequestCAFile" => test_pem("root-cert.pem"), 923 1.1 christos "MinProtocol" => "TLSv1.3", 924 1.1 christos "MaxProtocol" => "TLSv1.3" 925 1.1 christos }, 926 1.1 christos test => { 927 1.1 christos "ExpectedResult" => "ServerFail" 928 1.1 christos }, 929 1.1 christos }, 930 1.1 christos ); 931 1.1 christos 932 1.1 christos push @tests, @tests_tls_1_3 unless disabled("tls1_3"); 933 1.1 christos push @tests, @tests_tls_1_3_non_fips unless disabled("tls1_3") || $fips_mode; 934 1.1 christos 935 1.1 christos my @tests_dsa_tls_1_2 = ( 936 1.1 christos { 937 1.1 christos name => "TLS 1.2 DSA Certificate Test", 938 1.1 christos server => { 939 1.1 christos "DSA.Certificate" => test_pem("server-dsa-cert.pem"), 940 1.1 christos "DSA.PrivateKey" => test_pem("server-dsa-key.pem"), 941 1.1 christos "DHParameters" => test_pem("dhp2048.pem"), 942 1.1 christos "MinProtocol" => "TLSv1.2", 943 1.1 christos "MaxProtocol" => "TLSv1.2", 944 1.1 christos "CipherString" => "ALL", 945 1.1 christos }, 946 1.1 christos client => { 947 1.1 christos "SignatureAlgorithms" => "DSA+SHA256:DSA+SHA1", 948 1.1 christos "CipherString" => "ALL", 949 1.1 christos }, 950 1.1 christos test => { 951 1.1 christos "ExpectedResult" => "Success" 952 1.1 christos }, 953 1.1 christos }, 954 1.1 christos ); 955 1.1 christos 956 1.1 christos my @tests_dsa_tls_1_3 = ( 957 1.1 christos { 958 1.1 christos name => "TLS 1.3 Client Auth No TLS 1.3 Signature Algorithms", 959 1.1 christos server => { 960 1.1 christos "ClientSignatureAlgorithms" => "ECDSA+SHA1:DSA+SHA256:RSA+SHA256", 961 1.1 christos "VerifyCAFile" => test_pem("root-cert.pem"), 962 1.1 christos "VerifyMode" => "Request" 963 1.1 christos }, 964 1.1 christos client => {}, 965 1.1 christos test => { 966 1.1 christos "ExpectedResult" => "ServerFail" 967 1.1 christos }, 968 1.1 christos }, 969 1.1 christos { 970 1.1 christos name => "TLS 1.3 DSA Certificate Test", 971 1.1 christos server => { 972 1.1 christos "DSA.Certificate" => test_pem("server-dsa-cert.pem"), 973 1.1 christos "DSA.PrivateKey" => test_pem("server-dsa-key.pem"), 974 1.1 christos "MinProtocol" => "TLSv1.3", 975 1.1 christos "MaxProtocol" => "TLSv1.3", 976 1.1 christos "CipherString" => "ALL", 977 1.1 christos }, 978 1.1 christos client => { 979 1.1 christos "SignatureAlgorithms" => "DSA+SHA1:DSA+SHA256:ECDSA+SHA256", 980 1.1 christos "CipherString" => "ALL", 981 1.1 christos }, 982 1.1 christos test => { 983 1.1 christos "ExpectedResult" => "ServerFail" 984 1.1 christos }, 985 1.1 christos }, 986 1.1 christos ); 987 1.1 christos 988 1.1 christos if (!disabled("dsa")) { 989 1.1 christos push @tests, @tests_dsa_tls_1_2 unless disabled("dh"); 990 1.1 christos push @tests, @tests_dsa_tls_1_3 unless disabled("tls1_3"); 991 1.1 christos } 992