14-curves.cnf.in 1.4 KB

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