ciphers.go 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641
  1. // Copyright 2017 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. package http2
  5. // A list of the possible cipher suite ids. Taken from
  6. // https://www.iana.org/assignments/tls-parameters/tls-parameters.txt
  7. const (
  8. cipher_TLS_NULL_WITH_NULL_NULL uint16 = 0x0000
  9. cipher_TLS_RSA_WITH_NULL_MD5 uint16 = 0x0001
  10. cipher_TLS_RSA_WITH_NULL_SHA uint16 = 0x0002
  11. cipher_TLS_RSA_EXPORT_WITH_RC4_40_MD5 uint16 = 0x0003
  12. cipher_TLS_RSA_WITH_RC4_128_MD5 uint16 = 0x0004
  13. cipher_TLS_RSA_WITH_RC4_128_SHA uint16 = 0x0005
  14. cipher_TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5 uint16 = 0x0006
  15. cipher_TLS_RSA_WITH_IDEA_CBC_SHA uint16 = 0x0007
  16. cipher_TLS_RSA_EXPORT_WITH_DES40_CBC_SHA uint16 = 0x0008
  17. cipher_TLS_RSA_WITH_DES_CBC_SHA uint16 = 0x0009
  18. cipher_TLS_RSA_WITH_3DES_EDE_CBC_SHA uint16 = 0x000A
  19. cipher_TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA uint16 = 0x000B
  20. cipher_TLS_DH_DSS_WITH_DES_CBC_SHA uint16 = 0x000C
  21. cipher_TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA uint16 = 0x000D
  22. cipher_TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA uint16 = 0x000E
  23. cipher_TLS_DH_RSA_WITH_DES_CBC_SHA uint16 = 0x000F
  24. cipher_TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA uint16 = 0x0010
  25. cipher_TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA uint16 = 0x0011
  26. cipher_TLS_DHE_DSS_WITH_DES_CBC_SHA uint16 = 0x0012
  27. cipher_TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA uint16 = 0x0013
  28. cipher_TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA uint16 = 0x0014
  29. cipher_TLS_DHE_RSA_WITH_DES_CBC_SHA uint16 = 0x0015
  30. cipher_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA uint16 = 0x0016
  31. cipher_TLS_DH_anon_EXPORT_WITH_RC4_40_MD5 uint16 = 0x0017
  32. cipher_TLS_DH_anon_WITH_RC4_128_MD5 uint16 = 0x0018
  33. cipher_TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA uint16 = 0x0019
  34. cipher_TLS_DH_anon_WITH_DES_CBC_SHA uint16 = 0x001A
  35. cipher_TLS_DH_anon_WITH_3DES_EDE_CBC_SHA uint16 = 0x001B
  36. // Reserved uint16 = 0x001C-1D
  37. cipher_TLS_KRB5_WITH_DES_CBC_SHA uint16 = 0x001E
  38. cipher_TLS_KRB5_WITH_3DES_EDE_CBC_SHA uint16 = 0x001F
  39. cipher_TLS_KRB5_WITH_RC4_128_SHA uint16 = 0x0020
  40. cipher_TLS_KRB5_WITH_IDEA_CBC_SHA uint16 = 0x0021
  41. cipher_TLS_KRB5_WITH_DES_CBC_MD5 uint16 = 0x0022
  42. cipher_TLS_KRB5_WITH_3DES_EDE_CBC_MD5 uint16 = 0x0023
  43. cipher_TLS_KRB5_WITH_RC4_128_MD5 uint16 = 0x0024
  44. cipher_TLS_KRB5_WITH_IDEA_CBC_MD5 uint16 = 0x0025
  45. cipher_TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA uint16 = 0x0026
  46. cipher_TLS_KRB5_EXPORT_WITH_RC2_CBC_40_SHA uint16 = 0x0027
  47. cipher_TLS_KRB5_EXPORT_WITH_RC4_40_SHA uint16 = 0x0028
  48. cipher_TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5 uint16 = 0x0029
  49. cipher_TLS_KRB5_EXPORT_WITH_RC2_CBC_40_MD5 uint16 = 0x002A
  50. cipher_TLS_KRB5_EXPORT_WITH_RC4_40_MD5 uint16 = 0x002B
  51. cipher_TLS_PSK_WITH_NULL_SHA uint16 = 0x002C
  52. cipher_TLS_DHE_PSK_WITH_NULL_SHA uint16 = 0x002D
  53. cipher_TLS_RSA_PSK_WITH_NULL_SHA uint16 = 0x002E
  54. cipher_TLS_RSA_WITH_AES_128_CBC_SHA uint16 = 0x002F
  55. cipher_TLS_DH_DSS_WITH_AES_128_CBC_SHA uint16 = 0x0030
  56. cipher_TLS_DH_RSA_WITH_AES_128_CBC_SHA uint16 = 0x0031
  57. cipher_TLS_DHE_DSS_WITH_AES_128_CBC_SHA uint16 = 0x0032
  58. cipher_TLS_DHE_RSA_WITH_AES_128_CBC_SHA uint16 = 0x0033
  59. cipher_TLS_DH_anon_WITH_AES_128_CBC_SHA uint16 = 0x0034
  60. cipher_TLS_RSA_WITH_AES_256_CBC_SHA uint16 = 0x0035
  61. cipher_TLS_DH_DSS_WITH_AES_256_CBC_SHA uint16 = 0x0036
  62. cipher_TLS_DH_RSA_WITH_AES_256_CBC_SHA uint16 = 0x0037
  63. cipher_TLS_DHE_DSS_WITH_AES_256_CBC_SHA uint16 = 0x0038
  64. cipher_TLS_DHE_RSA_WITH_AES_256_CBC_SHA uint16 = 0x0039
  65. cipher_TLS_DH_anon_WITH_AES_256_CBC_SHA uint16 = 0x003A
  66. cipher_TLS_RSA_WITH_NULL_SHA256 uint16 = 0x003B
  67. cipher_TLS_RSA_WITH_AES_128_CBC_SHA256 uint16 = 0x003C
  68. cipher_TLS_RSA_WITH_AES_256_CBC_SHA256 uint16 = 0x003D
  69. cipher_TLS_DH_DSS_WITH_AES_128_CBC_SHA256 uint16 = 0x003E
  70. cipher_TLS_DH_RSA_WITH_AES_128_CBC_SHA256 uint16 = 0x003F
  71. cipher_TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 uint16 = 0x0040
  72. cipher_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA uint16 = 0x0041
  73. cipher_TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA uint16 = 0x0042
  74. cipher_TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA uint16 = 0x0043
  75. cipher_TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA uint16 = 0x0044
  76. cipher_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA uint16 = 0x0045
  77. cipher_TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA uint16 = 0x0046
  78. // Reserved uint16 = 0x0047-4F
  79. // Reserved uint16 = 0x0050-58
  80. // Reserved uint16 = 0x0059-5C
  81. // Unassigned uint16 = 0x005D-5F
  82. // Reserved uint16 = 0x0060-66
  83. cipher_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 uint16 = 0x0067
  84. cipher_TLS_DH_DSS_WITH_AES_256_CBC_SHA256 uint16 = 0x0068
  85. cipher_TLS_DH_RSA_WITH_AES_256_CBC_SHA256 uint16 = 0x0069
  86. cipher_TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 uint16 = 0x006A
  87. cipher_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 uint16 = 0x006B
  88. cipher_TLS_DH_anon_WITH_AES_128_CBC_SHA256 uint16 = 0x006C
  89. cipher_TLS_DH_anon_WITH_AES_256_CBC_SHA256 uint16 = 0x006D
  90. // Unassigned uint16 = 0x006E-83
  91. cipher_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA uint16 = 0x0084
  92. cipher_TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA uint16 = 0x0085
  93. cipher_TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA uint16 = 0x0086
  94. cipher_TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA uint16 = 0x0087
  95. cipher_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA uint16 = 0x0088
  96. cipher_TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA uint16 = 0x0089
  97. cipher_TLS_PSK_WITH_RC4_128_SHA uint16 = 0x008A
  98. cipher_TLS_PSK_WITH_3DES_EDE_CBC_SHA uint16 = 0x008B
  99. cipher_TLS_PSK_WITH_AES_128_CBC_SHA uint16 = 0x008C
  100. cipher_TLS_PSK_WITH_AES_256_CBC_SHA uint16 = 0x008D
  101. cipher_TLS_DHE_PSK_WITH_RC4_128_SHA uint16 = 0x008E
  102. cipher_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA uint16 = 0x008F
  103. cipher_TLS_DHE_PSK_WITH_AES_128_CBC_SHA uint16 = 0x0090
  104. cipher_TLS_DHE_PSK_WITH_AES_256_CBC_SHA uint16 = 0x0091
  105. cipher_TLS_RSA_PSK_WITH_RC4_128_SHA uint16 = 0x0092
  106. cipher_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA uint16 = 0x0093
  107. cipher_TLS_RSA_PSK_WITH_AES_128_CBC_SHA uint16 = 0x0094
  108. cipher_TLS_RSA_PSK_WITH_AES_256_CBC_SHA uint16 = 0x0095
  109. cipher_TLS_RSA_WITH_SEED_CBC_SHA uint16 = 0x0096
  110. cipher_TLS_DH_DSS_WITH_SEED_CBC_SHA uint16 = 0x0097
  111. cipher_TLS_DH_RSA_WITH_SEED_CBC_SHA uint16 = 0x0098
  112. cipher_TLS_DHE_DSS_WITH_SEED_CBC_SHA uint16 = 0x0099
  113. cipher_TLS_DHE_RSA_WITH_SEED_CBC_SHA uint16 = 0x009A
  114. cipher_TLS_DH_anon_WITH_SEED_CBC_SHA uint16 = 0x009B
  115. cipher_TLS_RSA_WITH_AES_128_GCM_SHA256 uint16 = 0x009C
  116. cipher_TLS_RSA_WITH_AES_256_GCM_SHA384 uint16 = 0x009D
  117. cipher_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 uint16 = 0x009E
  118. cipher_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 uint16 = 0x009F
  119. cipher_TLS_DH_RSA_WITH_AES_128_GCM_SHA256 uint16 = 0x00A0
  120. cipher_TLS_DH_RSA_WITH_AES_256_GCM_SHA384 uint16 = 0x00A1
  121. cipher_TLS_DHE_DSS_WITH_AES_128_GCM_SHA256 uint16 = 0x00A2
  122. cipher_TLS_DHE_DSS_WITH_AES_256_GCM_SHA384 uint16 = 0x00A3
  123. cipher_TLS_DH_DSS_WITH_AES_128_GCM_SHA256 uint16 = 0x00A4
  124. cipher_TLS_DH_DSS_WITH_AES_256_GCM_SHA384 uint16 = 0x00A5
  125. cipher_TLS_DH_anon_WITH_AES_128_GCM_SHA256 uint16 = 0x00A6
  126. cipher_TLS_DH_anon_WITH_AES_256_GCM_SHA384 uint16 = 0x00A7
  127. cipher_TLS_PSK_WITH_AES_128_GCM_SHA256 uint16 = 0x00A8
  128. cipher_TLS_PSK_WITH_AES_256_GCM_SHA384 uint16 = 0x00A9
  129. cipher_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 uint16 = 0x00AA
  130. cipher_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 uint16 = 0x00AB
  131. cipher_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256 uint16 = 0x00AC
  132. cipher_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384 uint16 = 0x00AD
  133. cipher_TLS_PSK_WITH_AES_128_CBC_SHA256 uint16 = 0x00AE
  134. cipher_TLS_PSK_WITH_AES_256_CBC_SHA384 uint16 = 0x00AF
  135. cipher_TLS_PSK_WITH_NULL_SHA256 uint16 = 0x00B0
  136. cipher_TLS_PSK_WITH_NULL_SHA384 uint16 = 0x00B1
  137. cipher_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 uint16 = 0x00B2
  138. cipher_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 uint16 = 0x00B3
  139. cipher_TLS_DHE_PSK_WITH_NULL_SHA256 uint16 = 0x00B4
  140. cipher_TLS_DHE_PSK_WITH_NULL_SHA384 uint16 = 0x00B5
  141. cipher_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 uint16 = 0x00B6
  142. cipher_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 uint16 = 0x00B7
  143. cipher_TLS_RSA_PSK_WITH_NULL_SHA256 uint16 = 0x00B8
  144. cipher_TLS_RSA_PSK_WITH_NULL_SHA384 uint16 = 0x00B9
  145. cipher_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0x00BA
  146. cipher_TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0x00BB
  147. cipher_TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0x00BC
  148. cipher_TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0x00BD
  149. cipher_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0x00BE
  150. cipher_TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0x00BF
  151. cipher_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 uint16 = 0x00C0
  152. cipher_TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256 uint16 = 0x00C1
  153. cipher_TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA256 uint16 = 0x00C2
  154. cipher_TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256 uint16 = 0x00C3
  155. cipher_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 uint16 = 0x00C4
  156. cipher_TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA256 uint16 = 0x00C5
  157. // Unassigned uint16 = 0x00C6-FE
  158. cipher_TLS_EMPTY_RENEGOTIATION_INFO_SCSV uint16 = 0x00FF
  159. // Unassigned uint16 = 0x01-55,*
  160. cipher_TLS_FALLBACK_SCSV uint16 = 0x5600
  161. // Unassigned uint16 = 0x5601 - 0xC000
  162. cipher_TLS_ECDH_ECDSA_WITH_NULL_SHA uint16 = 0xC001
  163. cipher_TLS_ECDH_ECDSA_WITH_RC4_128_SHA uint16 = 0xC002
  164. cipher_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA uint16 = 0xC003
  165. cipher_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA uint16 = 0xC004
  166. cipher_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA uint16 = 0xC005
  167. cipher_TLS_ECDHE_ECDSA_WITH_NULL_SHA uint16 = 0xC006
  168. cipher_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA uint16 = 0xC007
  169. cipher_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA uint16 = 0xC008
  170. cipher_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA uint16 = 0xC009
  171. cipher_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA uint16 = 0xC00A
  172. cipher_TLS_ECDH_RSA_WITH_NULL_SHA uint16 = 0xC00B
  173. cipher_TLS_ECDH_RSA_WITH_RC4_128_SHA uint16 = 0xC00C
  174. cipher_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA uint16 = 0xC00D
  175. cipher_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA uint16 = 0xC00E
  176. cipher_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA uint16 = 0xC00F
  177. cipher_TLS_ECDHE_RSA_WITH_NULL_SHA uint16 = 0xC010
  178. cipher_TLS_ECDHE_RSA_WITH_RC4_128_SHA uint16 = 0xC011
  179. cipher_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA uint16 = 0xC012
  180. cipher_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA uint16 = 0xC013
  181. cipher_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA uint16 = 0xC014
  182. cipher_TLS_ECDH_anon_WITH_NULL_SHA uint16 = 0xC015
  183. cipher_TLS_ECDH_anon_WITH_RC4_128_SHA uint16 = 0xC016
  184. cipher_TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA uint16 = 0xC017
  185. cipher_TLS_ECDH_anon_WITH_AES_128_CBC_SHA uint16 = 0xC018
  186. cipher_TLS_ECDH_anon_WITH_AES_256_CBC_SHA uint16 = 0xC019
  187. cipher_TLS_SRP_SHA_WITH_3DES_EDE_CBC_SHA uint16 = 0xC01A
  188. cipher_TLS_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA uint16 = 0xC01B
  189. cipher_TLS_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA uint16 = 0xC01C
  190. cipher_TLS_SRP_SHA_WITH_AES_128_CBC_SHA uint16 = 0xC01D
  191. cipher_TLS_SRP_SHA_RSA_WITH_AES_128_CBC_SHA uint16 = 0xC01E
  192. cipher_TLS_SRP_SHA_DSS_WITH_AES_128_CBC_SHA uint16 = 0xC01F
  193. cipher_TLS_SRP_SHA_WITH_AES_256_CBC_SHA uint16 = 0xC020
  194. cipher_TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA uint16 = 0xC021
  195. cipher_TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA uint16 = 0xC022
  196. cipher_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 uint16 = 0xC023
  197. cipher_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 uint16 = 0xC024
  198. cipher_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 uint16 = 0xC025
  199. cipher_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 uint16 = 0xC026
  200. cipher_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 uint16 = 0xC027
  201. cipher_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 uint16 = 0xC028
  202. cipher_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 uint16 = 0xC029
  203. cipher_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 uint16 = 0xC02A
  204. cipher_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 uint16 = 0xC02B
  205. cipher_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 uint16 = 0xC02C
  206. cipher_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 uint16 = 0xC02D
  207. cipher_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 uint16 = 0xC02E
  208. cipher_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 uint16 = 0xC02F
  209. cipher_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 uint16 = 0xC030
  210. cipher_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 uint16 = 0xC031
  211. cipher_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 uint16 = 0xC032
  212. cipher_TLS_ECDHE_PSK_WITH_RC4_128_SHA uint16 = 0xC033
  213. cipher_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA uint16 = 0xC034
  214. cipher_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA uint16 = 0xC035
  215. cipher_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA uint16 = 0xC036
  216. cipher_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256 uint16 = 0xC037
  217. cipher_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384 uint16 = 0xC038
  218. cipher_TLS_ECDHE_PSK_WITH_NULL_SHA uint16 = 0xC039
  219. cipher_TLS_ECDHE_PSK_WITH_NULL_SHA256 uint16 = 0xC03A
  220. cipher_TLS_ECDHE_PSK_WITH_NULL_SHA384 uint16 = 0xC03B
  221. cipher_TLS_RSA_WITH_ARIA_128_CBC_SHA256 uint16 = 0xC03C
  222. cipher_TLS_RSA_WITH_ARIA_256_CBC_SHA384 uint16 = 0xC03D
  223. cipher_TLS_DH_DSS_WITH_ARIA_128_CBC_SHA256 uint16 = 0xC03E
  224. cipher_TLS_DH_DSS_WITH_ARIA_256_CBC_SHA384 uint16 = 0xC03F
  225. cipher_TLS_DH_RSA_WITH_ARIA_128_CBC_SHA256 uint16 = 0xC040
  226. cipher_TLS_DH_RSA_WITH_ARIA_256_CBC_SHA384 uint16 = 0xC041
  227. cipher_TLS_DHE_DSS_WITH_ARIA_128_CBC_SHA256 uint16 = 0xC042
  228. cipher_TLS_DHE_DSS_WITH_ARIA_256_CBC_SHA384 uint16 = 0xC043
  229. cipher_TLS_DHE_RSA_WITH_ARIA_128_CBC_SHA256 uint16 = 0xC044
  230. cipher_TLS_DHE_RSA_WITH_ARIA_256_CBC_SHA384 uint16 = 0xC045
  231. cipher_TLS_DH_anon_WITH_ARIA_128_CBC_SHA256 uint16 = 0xC046
  232. cipher_TLS_DH_anon_WITH_ARIA_256_CBC_SHA384 uint16 = 0xC047
  233. cipher_TLS_ECDHE_ECDSA_WITH_ARIA_128_CBC_SHA256 uint16 = 0xC048
  234. cipher_TLS_ECDHE_ECDSA_WITH_ARIA_256_CBC_SHA384 uint16 = 0xC049
  235. cipher_TLS_ECDH_ECDSA_WITH_ARIA_128_CBC_SHA256 uint16 = 0xC04A
  236. cipher_TLS_ECDH_ECDSA_WITH_ARIA_256_CBC_SHA384 uint16 = 0xC04B
  237. cipher_TLS_ECDHE_RSA_WITH_ARIA_128_CBC_SHA256 uint16 = 0xC04C
  238. cipher_TLS_ECDHE_RSA_WITH_ARIA_256_CBC_SHA384 uint16 = 0xC04D
  239. cipher_TLS_ECDH_RSA_WITH_ARIA_128_CBC_SHA256 uint16 = 0xC04E
  240. cipher_TLS_ECDH_RSA_WITH_ARIA_256_CBC_SHA384 uint16 = 0xC04F
  241. cipher_TLS_RSA_WITH_ARIA_128_GCM_SHA256 uint16 = 0xC050
  242. cipher_TLS_RSA_WITH_ARIA_256_GCM_SHA384 uint16 = 0xC051
  243. cipher_TLS_DHE_RSA_WITH_ARIA_128_GCM_SHA256 uint16 = 0xC052
  244. cipher_TLS_DHE_RSA_WITH_ARIA_256_GCM_SHA384 uint16 = 0xC053
  245. cipher_TLS_DH_RSA_WITH_ARIA_128_GCM_SHA256 uint16 = 0xC054
  246. cipher_TLS_DH_RSA_WITH_ARIA_256_GCM_SHA384 uint16 = 0xC055
  247. cipher_TLS_DHE_DSS_WITH_ARIA_128_GCM_SHA256 uint16 = 0xC056
  248. cipher_TLS_DHE_DSS_WITH_ARIA_256_GCM_SHA384 uint16 = 0xC057
  249. cipher_TLS_DH_DSS_WITH_ARIA_128_GCM_SHA256 uint16 = 0xC058
  250. cipher_TLS_DH_DSS_WITH_ARIA_256_GCM_SHA384 uint16 = 0xC059
  251. cipher_TLS_DH_anon_WITH_ARIA_128_GCM_SHA256 uint16 = 0xC05A
  252. cipher_TLS_DH_anon_WITH_ARIA_256_GCM_SHA384 uint16 = 0xC05B
  253. cipher_TLS_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256 uint16 = 0xC05C
  254. cipher_TLS_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384 uint16 = 0xC05D
  255. cipher_TLS_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256 uint16 = 0xC05E
  256. cipher_TLS_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384 uint16 = 0xC05F
  257. cipher_TLS_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256 uint16 = 0xC060
  258. cipher_TLS_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384 uint16 = 0xC061
  259. cipher_TLS_ECDH_RSA_WITH_ARIA_128_GCM_SHA256 uint16 = 0xC062
  260. cipher_TLS_ECDH_RSA_WITH_ARIA_256_GCM_SHA384 uint16 = 0xC063
  261. cipher_TLS_PSK_WITH_ARIA_128_CBC_SHA256 uint16 = 0xC064
  262. cipher_TLS_PSK_WITH_ARIA_256_CBC_SHA384 uint16 = 0xC065
  263. cipher_TLS_DHE_PSK_WITH_ARIA_128_CBC_SHA256 uint16 = 0xC066
  264. cipher_TLS_DHE_PSK_WITH_ARIA_256_CBC_SHA384 uint16 = 0xC067
  265. cipher_TLS_RSA_PSK_WITH_ARIA_128_CBC_SHA256 uint16 = 0xC068
  266. cipher_TLS_RSA_PSK_WITH_ARIA_256_CBC_SHA384 uint16 = 0xC069
  267. cipher_TLS_PSK_WITH_ARIA_128_GCM_SHA256 uint16 = 0xC06A
  268. cipher_TLS_PSK_WITH_ARIA_256_GCM_SHA384 uint16 = 0xC06B
  269. cipher_TLS_DHE_PSK_WITH_ARIA_128_GCM_SHA256 uint16 = 0xC06C
  270. cipher_TLS_DHE_PSK_WITH_ARIA_256_GCM_SHA384 uint16 = 0xC06D
  271. cipher_TLS_RSA_PSK_WITH_ARIA_128_GCM_SHA256 uint16 = 0xC06E
  272. cipher_TLS_RSA_PSK_WITH_ARIA_256_GCM_SHA384 uint16 = 0xC06F
  273. cipher_TLS_ECDHE_PSK_WITH_ARIA_128_CBC_SHA256 uint16 = 0xC070
  274. cipher_TLS_ECDHE_PSK_WITH_ARIA_256_CBC_SHA384 uint16 = 0xC071
  275. cipher_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0xC072
  276. cipher_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 uint16 = 0xC073
  277. cipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0xC074
  278. cipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 uint16 = 0xC075
  279. cipher_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0xC076
  280. cipher_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384 uint16 = 0xC077
  281. cipher_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0xC078
  282. cipher_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384 uint16 = 0xC079
  283. cipher_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256 uint16 = 0xC07A
  284. cipher_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384 uint16 = 0xC07B
  285. cipher_TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 uint16 = 0xC07C
  286. cipher_TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 uint16 = 0xC07D
  287. cipher_TLS_DH_RSA_WITH_CAMELLIA_128_GCM_SHA256 uint16 = 0xC07E
  288. cipher_TLS_DH_RSA_WITH_CAMELLIA_256_GCM_SHA384 uint16 = 0xC07F
  289. cipher_TLS_DHE_DSS_WITH_CAMELLIA_128_GCM_SHA256 uint16 = 0xC080
  290. cipher_TLS_DHE_DSS_WITH_CAMELLIA_256_GCM_SHA384 uint16 = 0xC081
  291. cipher_TLS_DH_DSS_WITH_CAMELLIA_128_GCM_SHA256 uint16 = 0xC082
  292. cipher_TLS_DH_DSS_WITH_CAMELLIA_256_GCM_SHA384 uint16 = 0xC083
  293. cipher_TLS_DH_anon_WITH_CAMELLIA_128_GCM_SHA256 uint16 = 0xC084
  294. cipher_TLS_DH_anon_WITH_CAMELLIA_256_GCM_SHA384 uint16 = 0xC085
  295. cipher_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 uint16 = 0xC086
  296. cipher_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 uint16 = 0xC087
  297. cipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 uint16 = 0xC088
  298. cipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 uint16 = 0xC089
  299. cipher_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 uint16 = 0xC08A
  300. cipher_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 uint16 = 0xC08B
  301. cipher_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256 uint16 = 0xC08C
  302. cipher_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384 uint16 = 0xC08D
  303. cipher_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256 uint16 = 0xC08E
  304. cipher_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384 uint16 = 0xC08F
  305. cipher_TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256 uint16 = 0xC090
  306. cipher_TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384 uint16 = 0xC091
  307. cipher_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256 uint16 = 0xC092
  308. cipher_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384 uint16 = 0xC093
  309. cipher_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0xC094
  310. cipher_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384 uint16 = 0xC095
  311. cipher_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0xC096
  312. cipher_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 uint16 = 0xC097
  313. cipher_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0xC098
  314. cipher_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384 uint16 = 0xC099
  315. cipher_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0xC09A
  316. cipher_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 uint16 = 0xC09B
  317. cipher_TLS_RSA_WITH_AES_128_CCM uint16 = 0xC09C
  318. cipher_TLS_RSA_WITH_AES_256_CCM uint16 = 0xC09D
  319. cipher_TLS_DHE_RSA_WITH_AES_128_CCM uint16 = 0xC09E
  320. cipher_TLS_DHE_RSA_WITH_AES_256_CCM uint16 = 0xC09F
  321. cipher_TLS_RSA_WITH_AES_128_CCM_8 uint16 = 0xC0A0
  322. cipher_TLS_RSA_WITH_AES_256_CCM_8 uint16 = 0xC0A1
  323. cipher_TLS_DHE_RSA_WITH_AES_128_CCM_8 uint16 = 0xC0A2
  324. cipher_TLS_DHE_RSA_WITH_AES_256_CCM_8 uint16 = 0xC0A3
  325. cipher_TLS_PSK_WITH_AES_128_CCM uint16 = 0xC0A4
  326. cipher_TLS_PSK_WITH_AES_256_CCM uint16 = 0xC0A5
  327. cipher_TLS_DHE_PSK_WITH_AES_128_CCM uint16 = 0xC0A6
  328. cipher_TLS_DHE_PSK_WITH_AES_256_CCM uint16 = 0xC0A7
  329. cipher_TLS_PSK_WITH_AES_128_CCM_8 uint16 = 0xC0A8
  330. cipher_TLS_PSK_WITH_AES_256_CCM_8 uint16 = 0xC0A9
  331. cipher_TLS_PSK_DHE_WITH_AES_128_CCM_8 uint16 = 0xC0AA
  332. cipher_TLS_PSK_DHE_WITH_AES_256_CCM_8 uint16 = 0xC0AB
  333. cipher_TLS_ECDHE_ECDSA_WITH_AES_128_CCM uint16 = 0xC0AC
  334. cipher_TLS_ECDHE_ECDSA_WITH_AES_256_CCM uint16 = 0xC0AD
  335. cipher_TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 uint16 = 0xC0AE
  336. cipher_TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8 uint16 = 0xC0AF
  337. // Unassigned uint16 = 0xC0B0-FF
  338. // Unassigned uint16 = 0xC1-CB,*
  339. // Unassigned uint16 = 0xCC00-A7
  340. cipher_TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 uint16 = 0xCCA8
  341. cipher_TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 uint16 = 0xCCA9
  342. cipher_TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256 uint16 = 0xCCAA
  343. cipher_TLS_PSK_WITH_CHACHA20_POLY1305_SHA256 uint16 = 0xCCAB
  344. cipher_TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256 uint16 = 0xCCAC
  345. cipher_TLS_DHE_PSK_WITH_CHACHA20_POLY1305_SHA256 uint16 = 0xCCAD
  346. cipher_TLS_RSA_PSK_WITH_CHACHA20_POLY1305_SHA256 uint16 = 0xCCAE
  347. )
  348. // isBadCipher reports whether the cipher is blacklisted by the HTTP/2 spec.
  349. // References:
  350. // https://tools.ietf.org/html/rfc7540#appendix-A
  351. // Reject cipher suites from Appendix A.
  352. // "This list includes those cipher suites that do not
  353. // offer an ephemeral key exchange and those that are
  354. // based on the TLS null, stream or block cipher type"
  355. func isBadCipher(cipher uint16) bool {
  356. switch cipher {
  357. case cipher_TLS_NULL_WITH_NULL_NULL,
  358. cipher_TLS_RSA_WITH_NULL_MD5,
  359. cipher_TLS_RSA_WITH_NULL_SHA,
  360. cipher_TLS_RSA_EXPORT_WITH_RC4_40_MD5,
  361. cipher_TLS_RSA_WITH_RC4_128_MD5,
  362. cipher_TLS_RSA_WITH_RC4_128_SHA,
  363. cipher_TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5,
  364. cipher_TLS_RSA_WITH_IDEA_CBC_SHA,
  365. cipher_TLS_RSA_EXPORT_WITH_DES40_CBC_SHA,
  366. cipher_TLS_RSA_WITH_DES_CBC_SHA,
  367. cipher_TLS_RSA_WITH_3DES_EDE_CBC_SHA,
  368. cipher_TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA,
  369. cipher_TLS_DH_DSS_WITH_DES_CBC_SHA,
  370. cipher_TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA,
  371. cipher_TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA,
  372. cipher_TLS_DH_RSA_WITH_DES_CBC_SHA,
  373. cipher_TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA,
  374. cipher_TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA,
  375. cipher_TLS_DHE_DSS_WITH_DES_CBC_SHA,
  376. cipher_TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA,
  377. cipher_TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA,
  378. cipher_TLS_DHE_RSA_WITH_DES_CBC_SHA,
  379. cipher_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA,
  380. cipher_TLS_DH_anon_EXPORT_WITH_RC4_40_MD5,
  381. cipher_TLS_DH_anon_WITH_RC4_128_MD5,
  382. cipher_TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA,
  383. cipher_TLS_DH_anon_WITH_DES_CBC_SHA,
  384. cipher_TLS_DH_anon_WITH_3DES_EDE_CBC_SHA,
  385. cipher_TLS_KRB5_WITH_DES_CBC_SHA,
  386. cipher_TLS_KRB5_WITH_3DES_EDE_CBC_SHA,
  387. cipher_TLS_KRB5_WITH_RC4_128_SHA,
  388. cipher_TLS_KRB5_WITH_IDEA_CBC_SHA,
  389. cipher_TLS_KRB5_WITH_DES_CBC_MD5,
  390. cipher_TLS_KRB5_WITH_3DES_EDE_CBC_MD5,
  391. cipher_TLS_KRB5_WITH_RC4_128_MD5,
  392. cipher_TLS_KRB5_WITH_IDEA_CBC_MD5,
  393. cipher_TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA,
  394. cipher_TLS_KRB5_EXPORT_WITH_RC2_CBC_40_SHA,
  395. cipher_TLS_KRB5_EXPORT_WITH_RC4_40_SHA,
  396. cipher_TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5,
  397. cipher_TLS_KRB5_EXPORT_WITH_RC2_CBC_40_MD5,
  398. cipher_TLS_KRB5_EXPORT_WITH_RC4_40_MD5,
  399. cipher_TLS_PSK_WITH_NULL_SHA,
  400. cipher_TLS_DHE_PSK_WITH_NULL_SHA,
  401. cipher_TLS_RSA_PSK_WITH_NULL_SHA,
  402. cipher_TLS_RSA_WITH_AES_128_CBC_SHA,
  403. cipher_TLS_DH_DSS_WITH_AES_128_CBC_SHA,
  404. cipher_TLS_DH_RSA_WITH_AES_128_CBC_SHA,
  405. cipher_TLS_DHE_DSS_WITH_AES_128_CBC_SHA,
  406. cipher_TLS_DHE_RSA_WITH_AES_128_CBC_SHA,
  407. cipher_TLS_DH_anon_WITH_AES_128_CBC_SHA,
  408. cipher_TLS_RSA_WITH_AES_256_CBC_SHA,
  409. cipher_TLS_DH_DSS_WITH_AES_256_CBC_SHA,
  410. cipher_TLS_DH_RSA_WITH_AES_256_CBC_SHA,
  411. cipher_TLS_DHE_DSS_WITH_AES_256_CBC_SHA,
  412. cipher_TLS_DHE_RSA_WITH_AES_256_CBC_SHA,
  413. cipher_TLS_DH_anon_WITH_AES_256_CBC_SHA,
  414. cipher_TLS_RSA_WITH_NULL_SHA256,
  415. cipher_TLS_RSA_WITH_AES_128_CBC_SHA256,
  416. cipher_TLS_RSA_WITH_AES_256_CBC_SHA256,
  417. cipher_TLS_DH_DSS_WITH_AES_128_CBC_SHA256,
  418. cipher_TLS_DH_RSA_WITH_AES_128_CBC_SHA256,
  419. cipher_TLS_DHE_DSS_WITH_AES_128_CBC_SHA256,
  420. cipher_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA,
  421. cipher_TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA,
  422. cipher_TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA,
  423. cipher_TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA,
  424. cipher_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA,
  425. cipher_TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA,
  426. cipher_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,
  427. cipher_TLS_DH_DSS_WITH_AES_256_CBC_SHA256,
  428. cipher_TLS_DH_RSA_WITH_AES_256_CBC_SHA256,
  429. cipher_TLS_DHE_DSS_WITH_AES_256_CBC_SHA256,
  430. cipher_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256,
  431. cipher_TLS_DH_anon_WITH_AES_128_CBC_SHA256,
  432. cipher_TLS_DH_anon_WITH_AES_256_CBC_SHA256,
  433. cipher_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA,
  434. cipher_TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA,
  435. cipher_TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA,
  436. cipher_TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA,
  437. cipher_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA,
  438. cipher_TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA,
  439. cipher_TLS_PSK_WITH_RC4_128_SHA,
  440. cipher_TLS_PSK_WITH_3DES_EDE_CBC_SHA,
  441. cipher_TLS_PSK_WITH_AES_128_CBC_SHA,
  442. cipher_TLS_PSK_WITH_AES_256_CBC_SHA,
  443. cipher_TLS_DHE_PSK_WITH_RC4_128_SHA,
  444. cipher_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA,
  445. cipher_TLS_DHE_PSK_WITH_AES_128_CBC_SHA,
  446. cipher_TLS_DHE_PSK_WITH_AES_256_CBC_SHA,
  447. cipher_TLS_RSA_PSK_WITH_RC4_128_SHA,
  448. cipher_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA,
  449. cipher_TLS_RSA_PSK_WITH_AES_128_CBC_SHA,
  450. cipher_TLS_RSA_PSK_WITH_AES_256_CBC_SHA,
  451. cipher_TLS_RSA_WITH_SEED_CBC_SHA,
  452. cipher_TLS_DH_DSS_WITH_SEED_CBC_SHA,
  453. cipher_TLS_DH_RSA_WITH_SEED_CBC_SHA,
  454. cipher_TLS_DHE_DSS_WITH_SEED_CBC_SHA,
  455. cipher_TLS_DHE_RSA_WITH_SEED_CBC_SHA,
  456. cipher_TLS_DH_anon_WITH_SEED_CBC_SHA,
  457. cipher_TLS_RSA_WITH_AES_128_GCM_SHA256,
  458. cipher_TLS_RSA_WITH_AES_256_GCM_SHA384,
  459. cipher_TLS_DH_RSA_WITH_AES_128_GCM_SHA256,
  460. cipher_TLS_DH_RSA_WITH_AES_256_GCM_SHA384,
  461. cipher_TLS_DH_DSS_WITH_AES_128_GCM_SHA256,
  462. cipher_TLS_DH_DSS_WITH_AES_256_GCM_SHA384,
  463. cipher_TLS_DH_anon_WITH_AES_128_GCM_SHA256,
  464. cipher_TLS_DH_anon_WITH_AES_256_GCM_SHA384,
  465. cipher_TLS_PSK_WITH_AES_128_GCM_SHA256,
  466. cipher_TLS_PSK_WITH_AES_256_GCM_SHA384,
  467. cipher_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256,
  468. cipher_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384,
  469. cipher_TLS_PSK_WITH_AES_128_CBC_SHA256,
  470. cipher_TLS_PSK_WITH_AES_256_CBC_SHA384,
  471. cipher_TLS_PSK_WITH_NULL_SHA256,
  472. cipher_TLS_PSK_WITH_NULL_SHA384,
  473. cipher_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256,
  474. cipher_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384,
  475. cipher_TLS_DHE_PSK_WITH_NULL_SHA256,
  476. cipher_TLS_DHE_PSK_WITH_NULL_SHA384,
  477. cipher_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256,
  478. cipher_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384,
  479. cipher_TLS_RSA_PSK_WITH_NULL_SHA256,
  480. cipher_TLS_RSA_PSK_WITH_NULL_SHA384,
  481. cipher_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256,
  482. cipher_TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA256,
  483. cipher_TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA256,
  484. cipher_TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256,
  485. cipher_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256,
  486. cipher_TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA256,
  487. cipher_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256,
  488. cipher_TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256,
  489. cipher_TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA256,
  490. cipher_TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256,
  491. cipher_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256,
  492. cipher_TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA256,
  493. cipher_TLS_EMPTY_RENEGOTIATION_INFO_SCSV,
  494. cipher_TLS_ECDH_ECDSA_WITH_NULL_SHA,
  495. cipher_TLS_ECDH_ECDSA_WITH_RC4_128_SHA,
  496. cipher_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA,
  497. cipher_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA,
  498. cipher_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA,
  499. cipher_TLS_ECDHE_ECDSA_WITH_NULL_SHA,
  500. cipher_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA,
  501. cipher_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA,
  502. cipher_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
  503. cipher_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
  504. cipher_TLS_ECDH_RSA_WITH_NULL_SHA,
  505. cipher_TLS_ECDH_RSA_WITH_RC4_128_SHA,
  506. cipher_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA,
  507. cipher_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA,
  508. cipher_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA,
  509. cipher_TLS_ECDHE_RSA_WITH_NULL_SHA,
  510. cipher_TLS_ECDHE_RSA_WITH_RC4_128_SHA,
  511. cipher_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA,
  512. cipher_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,
  513. cipher_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
  514. cipher_TLS_ECDH_anon_WITH_NULL_SHA,
  515. cipher_TLS_ECDH_anon_WITH_RC4_128_SHA,
  516. cipher_TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA,
  517. cipher_TLS_ECDH_anon_WITH_AES_128_CBC_SHA,
  518. cipher_TLS_ECDH_anon_WITH_AES_256_CBC_SHA,
  519. cipher_TLS_SRP_SHA_WITH_3DES_EDE_CBC_SHA,
  520. cipher_TLS_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA,
  521. cipher_TLS_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA,
  522. cipher_TLS_SRP_SHA_WITH_AES_128_CBC_SHA,
  523. cipher_TLS_SRP_SHA_RSA_WITH_AES_128_CBC_SHA,
  524. cipher_TLS_SRP_SHA_DSS_WITH_AES_128_CBC_SHA,
  525. cipher_TLS_SRP_SHA_WITH_AES_256_CBC_SHA,
  526. cipher_TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA,
  527. cipher_TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA,
  528. cipher_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,
  529. cipher_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,
  530. cipher_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256,
  531. cipher_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384,
  532. cipher_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,
  533. cipher_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,
  534. cipher_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256,
  535. cipher_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384,
  536. cipher_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256,
  537. cipher_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384,
  538. cipher_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256,
  539. cipher_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384,
  540. cipher_TLS_ECDHE_PSK_WITH_RC4_128_SHA,
  541. cipher_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA,
  542. cipher_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA,
  543. cipher_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA,
  544. cipher_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256,
  545. cipher_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384,
  546. cipher_TLS_ECDHE_PSK_WITH_NULL_SHA,
  547. cipher_TLS_ECDHE_PSK_WITH_NULL_SHA256,
  548. cipher_TLS_ECDHE_PSK_WITH_NULL_SHA384,
  549. cipher_TLS_RSA_WITH_ARIA_128_CBC_SHA256,
  550. cipher_TLS_RSA_WITH_ARIA_256_CBC_SHA384,
  551. cipher_TLS_DH_DSS_WITH_ARIA_128_CBC_SHA256,
  552. cipher_TLS_DH_DSS_WITH_ARIA_256_CBC_SHA384,
  553. cipher_TLS_DH_RSA_WITH_ARIA_128_CBC_SHA256,
  554. cipher_TLS_DH_RSA_WITH_ARIA_256_CBC_SHA384,
  555. cipher_TLS_DHE_DSS_WITH_ARIA_128_CBC_SHA256,
  556. cipher_TLS_DHE_DSS_WITH_ARIA_256_CBC_SHA384,
  557. cipher_TLS_DHE_RSA_WITH_ARIA_128_CBC_SHA256,
  558. cipher_TLS_DHE_RSA_WITH_ARIA_256_CBC_SHA384,
  559. cipher_TLS_DH_anon_WITH_ARIA_128_CBC_SHA256,
  560. cipher_TLS_DH_anon_WITH_ARIA_256_CBC_SHA384,
  561. cipher_TLS_ECDHE_ECDSA_WITH_ARIA_128_CBC_SHA256,
  562. cipher_TLS_ECDHE_ECDSA_WITH_ARIA_256_CBC_SHA384,
  563. cipher_TLS_ECDH_ECDSA_WITH_ARIA_128_CBC_SHA256,
  564. cipher_TLS_ECDH_ECDSA_WITH_ARIA_256_CBC_SHA384,
  565. cipher_TLS_ECDHE_RSA_WITH_ARIA_128_CBC_SHA256,
  566. cipher_TLS_ECDHE_RSA_WITH_ARIA_256_CBC_SHA384,
  567. cipher_TLS_ECDH_RSA_WITH_ARIA_128_CBC_SHA256,
  568. cipher_TLS_ECDH_RSA_WITH_ARIA_256_CBC_SHA384,
  569. cipher_TLS_RSA_WITH_ARIA_128_GCM_SHA256,
  570. cipher_TLS_RSA_WITH_ARIA_256_GCM_SHA384,
  571. cipher_TLS_DH_RSA_WITH_ARIA_128_GCM_SHA256,
  572. cipher_TLS_DH_RSA_WITH_ARIA_256_GCM_SHA384,
  573. cipher_TLS_DH_DSS_WITH_ARIA_128_GCM_SHA256,
  574. cipher_TLS_DH_DSS_WITH_ARIA_256_GCM_SHA384,
  575. cipher_TLS_DH_anon_WITH_ARIA_128_GCM_SHA256,
  576. cipher_TLS_DH_anon_WITH_ARIA_256_GCM_SHA384,
  577. cipher_TLS_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256,
  578. cipher_TLS_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384,
  579. cipher_TLS_ECDH_RSA_WITH_ARIA_128_GCM_SHA256,
  580. cipher_TLS_ECDH_RSA_WITH_ARIA_256_GCM_SHA384,
  581. cipher_TLS_PSK_WITH_ARIA_128_CBC_SHA256,
  582. cipher_TLS_PSK_WITH_ARIA_256_CBC_SHA384,
  583. cipher_TLS_DHE_PSK_WITH_ARIA_128_CBC_SHA256,
  584. cipher_TLS_DHE_PSK_WITH_ARIA_256_CBC_SHA384,
  585. cipher_TLS_RSA_PSK_WITH_ARIA_128_CBC_SHA256,
  586. cipher_TLS_RSA_PSK_WITH_ARIA_256_CBC_SHA384,
  587. cipher_TLS_PSK_WITH_ARIA_128_GCM_SHA256,
  588. cipher_TLS_PSK_WITH_ARIA_256_GCM_SHA384,
  589. cipher_TLS_RSA_PSK_WITH_ARIA_128_GCM_SHA256,
  590. cipher_TLS_RSA_PSK_WITH_ARIA_256_GCM_SHA384,
  591. cipher_TLS_ECDHE_PSK_WITH_ARIA_128_CBC_SHA256,
  592. cipher_TLS_ECDHE_PSK_WITH_ARIA_256_CBC_SHA384,
  593. cipher_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256,
  594. cipher_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384,
  595. cipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256,
  596. cipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384,
  597. cipher_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256,
  598. cipher_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384,
  599. cipher_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256,
  600. cipher_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384,
  601. cipher_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256,
  602. cipher_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384,
  603. cipher_TLS_DH_RSA_WITH_CAMELLIA_128_GCM_SHA256,
  604. cipher_TLS_DH_RSA_WITH_CAMELLIA_256_GCM_SHA384,
  605. cipher_TLS_DH_DSS_WITH_CAMELLIA_128_GCM_SHA256,
  606. cipher_TLS_DH_DSS_WITH_CAMELLIA_256_GCM_SHA384,
  607. cipher_TLS_DH_anon_WITH_CAMELLIA_128_GCM_SHA256,
  608. cipher_TLS_DH_anon_WITH_CAMELLIA_256_GCM_SHA384,
  609. cipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256,
  610. cipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384,
  611. cipher_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256,
  612. cipher_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384,
  613. cipher_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256,
  614. cipher_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384,
  615. cipher_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256,
  616. cipher_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384,
  617. cipher_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256,
  618. cipher_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384,
  619. cipher_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256,
  620. cipher_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384,
  621. cipher_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256,
  622. cipher_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384,
  623. cipher_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256,
  624. cipher_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384,
  625. cipher_TLS_RSA_WITH_AES_128_CCM,
  626. cipher_TLS_RSA_WITH_AES_256_CCM,
  627. cipher_TLS_RSA_WITH_AES_128_CCM_8,
  628. cipher_TLS_RSA_WITH_AES_256_CCM_8,
  629. cipher_TLS_PSK_WITH_AES_128_CCM,
  630. cipher_TLS_PSK_WITH_AES_256_CCM,
  631. cipher_TLS_PSK_WITH_AES_128_CCM_8,
  632. cipher_TLS_PSK_WITH_AES_256_CCM_8:
  633. return true
  634. default:
  635. return false
  636. }
  637. }