25-cipher.conf.in 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. # -*- mode: perl; -*-
  2. # Copyright 2017 The OpenSSL Project Authors. All Rights Reserved.
  3. #
  4. # Licensed under the OpenSSL license (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 version negotiation
  9. use strict;
  10. use warnings;
  11. package ssltests;
  12. use OpenSSL::Test::Utils;
  13. our @tests = (
  14. {
  15. name => "cipher-server-1",
  16. server => {
  17. "MaxProtocol" => "TLSv1.2",
  18. "CipherString" => "ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256",
  19. },
  20. client => {
  21. "MaxProtocol" => "TLSv1.2",
  22. "CipherString" => "ECDHE-RSA-AES256-SHA384"
  23. },
  24. test => {
  25. "ExpectedCipher" => "ECDHE-RSA-AES256-SHA384",
  26. },
  27. },
  28. {
  29. name => "cipher-server-2",
  30. server => {
  31. "MaxProtocol" => "TLSv1.2",
  32. "CipherString" => "ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256",
  33. },
  34. client => {
  35. "MaxProtocol" => "TLSv1.2",
  36. "CipherString" => "ECDHE-RSA-AES128-SHA256"
  37. },
  38. test => {
  39. "ExpectedCipher" => "ECDHE-RSA-AES128-SHA256",
  40. },
  41. },
  42. {
  43. name => "cipher-server-client-list",
  44. server => {
  45. "MaxProtocol" => "TLSv1.2",
  46. "CipherString" => "ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256",
  47. },
  48. client => {
  49. "MaxProtocol" => "TLSv1.2",
  50. "CipherString" => "ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384",
  51. },
  52. test => {
  53. "ExpectedCipher" => "ECDHE-RSA-AES128-SHA256",
  54. },
  55. },
  56. {
  57. name => "cipher-server-pref-1",
  58. server => {
  59. "MaxProtocol" => "TLSv1.2",
  60. "CipherString" => "ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256",
  61. "Options" => "ServerPreference",
  62. },
  63. client => {
  64. "MaxProtocol" => "TLSv1.2",
  65. "CipherString" => "ECDHE-RSA-AES256-SHA384"
  66. },
  67. test => {
  68. "ExpectedCipher" => "ECDHE-RSA-AES256-SHA384",
  69. },
  70. },
  71. {
  72. name => "cipher-server-pref-2",
  73. server => {
  74. "MaxProtocol" => "TLSv1.2",
  75. "CipherString" => "ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256",
  76. "Options" => "ServerPreference",
  77. },
  78. client => {
  79. "MaxProtocol" => "TLSv1.2",
  80. "CipherString" => "ECDHE-RSA-AES128-SHA256"
  81. },
  82. test => {
  83. "ExpectedCipher" => "ECDHE-RSA-AES128-SHA256",
  84. },
  85. },
  86. {
  87. name => "cipher-server-pref-client-list",
  88. server => {
  89. "MaxProtocol" => "TLSv1.2",
  90. "CipherString" => "ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256",
  91. "Options" => "ServerPreference",
  92. },
  93. client => {
  94. "MaxProtocol" => "TLSv1.2",
  95. "CipherString" => "ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384",
  96. },
  97. test => {
  98. "ExpectedCipher" => "ECDHE-RSA-AES256-SHA384",
  99. },
  100. },
  101. {
  102. name => "cipher-server-pref-not-mobile",
  103. server => {
  104. "MaxProtocol" => "TLSv1.2",
  105. "CipherString" => "ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-CHACHA20-POLY1305",
  106. "Options" => "ServerPreference",
  107. },
  108. client => {
  109. "MaxProtocol" => "TLSv1.2",
  110. "CipherString" => "ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384",
  111. },
  112. test => {
  113. "ExpectedCipher" => "ECDHE-RSA-AES256-SHA384",
  114. },
  115. },
  116. {
  117. name => "cipher-server-pref-mobile",
  118. server => {
  119. "MaxProtocol" => "TLSv1.2",
  120. "CipherString" => "ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-CHACHA20-POLY1305",
  121. "Options" => "ServerPreference,PrioritizeChaCha",
  122. },
  123. client => {
  124. "MaxProtocol" => "TLSv1.2",
  125. "CipherString" => "ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-CHACHA20-POLY1305",
  126. },
  127. test => {
  128. "ExpectedCipher" => "ECDHE-RSA-AES256-SHA384",
  129. },
  130. },
  131. );
  132. my @tests_poly1305 = (
  133. {
  134. name => "cipher-server-pref-mobile2",
  135. server => {
  136. "MaxProtocol" => "TLSv1.2",
  137. "CipherString" => "ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-CHACHA20-POLY1305",
  138. "Options" => "ServerPreference,PrioritizeChaCha",
  139. },
  140. client => {
  141. "MaxProtocol" => "TLSv1.2",
  142. "CipherString" => "ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384",
  143. },
  144. test => {
  145. "ExpectedCipher" => "ECDHE-RSA-CHACHA20-POLY1305",
  146. },
  147. },
  148. );
  149. push @tests, @tests_poly1305 unless disabled("poly1305") || disabled("chacha");