2
0

14-curves.cnf.in 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # -*- mode: perl; -*-
  2. ## SSL test configurations
  3. package ssltests;
  4. use strict;
  5. use warnings;
  6. use OpenSSL::Test;
  7. use OpenSSL::Test::Utils qw(anydisabled);
  8. our $fips_mode;
  9. my @curves = ("sect233k1", "sect233r1",
  10. "sect283k1", "sect283r1", "sect409k1", "sect409r1",
  11. "sect571k1", "sect571r1", "secp224r1",
  12. "prime256v1", "secp384r1", "secp521r1", "X25519",
  13. "X448");
  14. my @curves_non_fips = ("sect163k1", "sect163r2", "prime192v1",
  15. "sect163r1", "sect193r1", "sect193r2", "sect239k1",
  16. "secp160k1", "secp160r1", "secp160r2", "secp192k1",
  17. "secp224k1", "secp256k1", "brainpoolP256r1",
  18. "brainpoolP384r1", "brainpoolP512r1");
  19. push @curves, @curves_non_fips if !$fips_mode;
  20. our @tests = ();
  21. sub generate_tests() {
  22. foreach (0..$#curves) {
  23. my $curve = $curves[$_];
  24. push @tests, {
  25. name => "curve-${curve}",
  26. server => {
  27. "Curves" => $curve,
  28. # TODO(TLS1.3): Can we get this to work for TLSv1.3?
  29. "MaxProtocol" => "TLSv1.2"
  30. },
  31. client => {
  32. "CipherString" => "ECDHE",
  33. "MaxProtocol" => "TLSv1.2",
  34. "Curves" => $curve
  35. },
  36. test => {
  37. "ExpectedTmpKeyType" => $curve,
  38. "ExpectedResult" => "Success"
  39. },
  40. };
  41. }
  42. }
  43. generate_tests();