22-compression.cnf.in 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. # -*- mode: perl; -*-
  2. # Copyright 2016-2020 The OpenSSL Project Authors. All Rights Reserved.
  3. #
  4. # Licensed under the Apache License 2.0 (the "License"). You may not use
  5. # this file except in compliance with the License. You can obtain a copy
  6. # in the file LICENSE in the source distribution or at
  7. # https://www.openssl.org/source/license.html
  8. ## Test Compression
  9. use strict;
  10. use warnings;
  11. package ssltests;
  12. use OpenSSL::Test::Utils;
  13. our @tests = ();
  14. our @tests_tls1_3 = (
  15. {
  16. name => "tlsv1_3-both-compress",
  17. server => {
  18. "CipherString" => 'DEFAULT@SECLEVEL=1',
  19. "Options" => "Compression"
  20. },
  21. client => {
  22. "CipherString" => 'DEFAULT@SECLEVEL=1',
  23. "Options" => "Compression"
  24. },
  25. test => {
  26. "CompressionExpected" => "No",
  27. "ExpectedResult" => "Success"
  28. }
  29. },
  30. {
  31. name => "tlsv1_3-client-compress",
  32. server => {
  33. "CipherString" => 'DEFAULT@SECLEVEL=1',
  34. },
  35. client => {
  36. "CipherString" => 'DEFAULT@SECLEVEL=1',
  37. "Options" => "Compression"
  38. },
  39. test => {
  40. "CompressionExpected" => "No",
  41. "ExpectedResult" => "Success"
  42. }
  43. },
  44. {
  45. name => "tlsv1_3-server-compress",
  46. server => {
  47. "CipherString" => 'DEFAULT@SECLEVEL=1',
  48. "Options" => "Compression"
  49. },
  50. client => {
  51. "CipherString" => 'DEFAULT@SECLEVEL=1',
  52. },
  53. test => {
  54. "CompressionExpected" => "No",
  55. "ExpectedResult" => "Success"
  56. }
  57. },
  58. {
  59. name => "tlsv1_3-neither-compress",
  60. server => {
  61. "CipherString" => 'DEFAULT@SECLEVEL=1',
  62. },
  63. client => {
  64. "CipherString" => 'DEFAULT@SECLEVEL=1',
  65. },
  66. test => {
  67. "CompressionExpected" => "No",
  68. "ExpectedResult" => "Success"
  69. }
  70. },
  71. );
  72. our @tests_tls1_2 = (
  73. {
  74. name => "tlsv1_2-both-compress",
  75. server => {
  76. "CipherString" => 'DEFAULT@SECLEVEL=1',
  77. "Options" => "Compression"
  78. },
  79. client => {
  80. "CipherString" => 'DEFAULT@SECLEVEL=1',
  81. "Options" => "Compression",
  82. "MaxProtocol" => "TLSv1.2"
  83. },
  84. test => {
  85. "CompressionExpected" => "Yes",
  86. "ExpectedResult" => "Success"
  87. }
  88. },
  89. {
  90. name => "tlsv1_2-client-compress",
  91. server => {
  92. "CipherString" => 'DEFAULT@SECLEVEL=1',
  93. },
  94. client => {
  95. "CipherString" => 'DEFAULT@SECLEVEL=1',
  96. "Options" => "Compression",
  97. "MaxProtocol" => "TLSv1.2"
  98. },
  99. test => {
  100. "CompressionExpected" => "No",
  101. "ExpectedResult" => "Success"
  102. }
  103. },
  104. {
  105. name => "tlsv1_2-server-compress",
  106. server => {
  107. "CipherString" => 'DEFAULT@SECLEVEL=1',
  108. "Options" => "Compression"
  109. },
  110. client => {
  111. "CipherString" => 'DEFAULT@SECLEVEL=1',
  112. "MaxProtocol" => "TLSv1.2"
  113. },
  114. test => {
  115. "CompressionExpected" => "No",
  116. "ExpectedResult" => "Success"
  117. }
  118. },
  119. {
  120. name => "tlsv1_2-neither-compress",
  121. server => {
  122. "CipherString" => 'DEFAULT@SECLEVEL=1',
  123. },
  124. client => {
  125. "CipherString" => 'DEFAULT@SECLEVEL=1',
  126. "MaxProtocol" => "TLSv1.2"
  127. },
  128. test => {
  129. "CompressionExpected" => "No",
  130. "ExpectedResult" => "Success"
  131. }
  132. },
  133. );
  134. push @tests, @tests_tls1_3 unless disabled("tls1_3");
  135. push @tests, @tests_tls1_2 unless alldisabled(("tls1_2", "tls1_1", "tls1",
  136. "ssl3"));