tls1.h 71 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234
  1. /*
  2. * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
  3. * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved
  4. * Copyright 2005 Nokia. All rights reserved.
  5. *
  6. * Licensed under the OpenSSL license (the "License"). You may not use
  7. * this file except in compliance with the License. You can obtain a copy
  8. * in the file LICENSE in the source distribution or at
  9. * https://www.openssl.org/source/license.html
  10. */
  11. #ifndef HEADER_TLS1_H
  12. # define HEADER_TLS1_H
  13. # include <openssl/buffer.h>
  14. # include <openssl/x509.h>
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. /* Default security level if not overridden at config time */
  19. # ifndef OPENSSL_TLS_SECURITY_LEVEL
  20. # define OPENSSL_TLS_SECURITY_LEVEL 1
  21. # endif
  22. # define TLS1_VERSION 0x0301
  23. # define TLS1_1_VERSION 0x0302
  24. # define TLS1_2_VERSION 0x0303
  25. # define TLS1_3_VERSION 0x0304
  26. # define TLS_MAX_VERSION TLS1_3_VERSION
  27. /* TODO(TLS1.3) REMOVE ME: Version indicator for draft -23 */
  28. # define TLS1_3_VERSION_DRAFT 0x7f17
  29. # define TLS1_3_VERSION_DRAFT_TXT "TLS 1.3 (draft 23)"
  30. /* Special value for method supporting multiple versions */
  31. # define TLS_ANY_VERSION 0x10000
  32. # define TLS1_VERSION_MAJOR 0x03
  33. # define TLS1_VERSION_MINOR 0x01
  34. # define TLS1_1_VERSION_MAJOR 0x03
  35. # define TLS1_1_VERSION_MINOR 0x02
  36. # define TLS1_2_VERSION_MAJOR 0x03
  37. # define TLS1_2_VERSION_MINOR 0x03
  38. # define TLS1_get_version(s) \
  39. ((SSL_version(s) >> 8) == TLS1_VERSION_MAJOR ? SSL_version(s) : 0)
  40. # define TLS1_get_client_version(s) \
  41. ((SSL_client_version(s) >> 8) == TLS1_VERSION_MAJOR ? SSL_client_version(s) : 0)
  42. # define TLS1_AD_DECRYPTION_FAILED 21
  43. # define TLS1_AD_RECORD_OVERFLOW 22
  44. # define TLS1_AD_UNKNOWN_CA 48/* fatal */
  45. # define TLS1_AD_ACCESS_DENIED 49/* fatal */
  46. # define TLS1_AD_DECODE_ERROR 50/* fatal */
  47. # define TLS1_AD_DECRYPT_ERROR 51
  48. # define TLS1_AD_EXPORT_RESTRICTION 60/* fatal */
  49. # define TLS1_AD_PROTOCOL_VERSION 70/* fatal */
  50. # define TLS1_AD_INSUFFICIENT_SECURITY 71/* fatal */
  51. # define TLS1_AD_INTERNAL_ERROR 80/* fatal */
  52. # define TLS1_AD_INAPPROPRIATE_FALLBACK 86/* fatal */
  53. # define TLS1_AD_USER_CANCELLED 90
  54. # define TLS1_AD_NO_RENEGOTIATION 100
  55. /* TLSv1.3 alerts */
  56. # define TLS13_AD_END_OF_EARLY_DATA 1
  57. # define TLS13_AD_MISSING_EXTENSION 109 /* fatal */
  58. # define TLS13_AD_CERTIFICATE_REQUIRED 116 /* fatal */
  59. /* codes 110-114 are from RFC3546 */
  60. # define TLS1_AD_UNSUPPORTED_EXTENSION 110
  61. # define TLS1_AD_CERTIFICATE_UNOBTAINABLE 111
  62. # define TLS1_AD_UNRECOGNIZED_NAME 112
  63. # define TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE 113
  64. # define TLS1_AD_BAD_CERTIFICATE_HASH_VALUE 114
  65. # define TLS1_AD_UNKNOWN_PSK_IDENTITY 115/* fatal */
  66. # define TLS1_AD_NO_APPLICATION_PROTOCOL 120 /* fatal */
  67. /* ExtensionType values from RFC3546 / RFC4366 / RFC6066 */
  68. # define TLSEXT_TYPE_server_name 0
  69. # define TLSEXT_TYPE_max_fragment_length 1
  70. # define TLSEXT_TYPE_client_certificate_url 2
  71. # define TLSEXT_TYPE_trusted_ca_keys 3
  72. # define TLSEXT_TYPE_truncated_hmac 4
  73. # define TLSEXT_TYPE_status_request 5
  74. /* ExtensionType values from RFC4681 */
  75. # define TLSEXT_TYPE_user_mapping 6
  76. /* ExtensionType values from RFC5878 */
  77. # define TLSEXT_TYPE_client_authz 7
  78. # define TLSEXT_TYPE_server_authz 8
  79. /* ExtensionType values from RFC6091 */
  80. # define TLSEXT_TYPE_cert_type 9
  81. /* ExtensionType values from RFC4492 */
  82. /*
  83. * Prior to TLSv1.3 the supported_groups extension was known as
  84. * elliptic_curves
  85. */
  86. # define TLSEXT_TYPE_supported_groups 10
  87. # define TLSEXT_TYPE_elliptic_curves TLSEXT_TYPE_supported_groups
  88. # define TLSEXT_TYPE_ec_point_formats 11
  89. /* ExtensionType value from RFC5054 */
  90. # define TLSEXT_TYPE_srp 12
  91. /* ExtensionType values from RFC5246 */
  92. # define TLSEXT_TYPE_signature_algorithms 13
  93. /* ExtensionType value from RFC5764 */
  94. # define TLSEXT_TYPE_use_srtp 14
  95. /* ExtensionType value from RFC5620 */
  96. # define TLSEXT_TYPE_heartbeat 15
  97. /* ExtensionType value from RFC7301 */
  98. # define TLSEXT_TYPE_application_layer_protocol_negotiation 16
  99. /*
  100. * Extension type for Certificate Transparency
  101. * https://tools.ietf.org/html/rfc6962#section-3.3.1
  102. */
  103. # define TLSEXT_TYPE_signed_certificate_timestamp 18
  104. /*
  105. * ExtensionType value for TLS padding extension.
  106. * http://tools.ietf.org/html/draft-agl-tls-padding
  107. */
  108. # define TLSEXT_TYPE_padding 21
  109. /* ExtensionType value from RFC7366 */
  110. # define TLSEXT_TYPE_encrypt_then_mac 22
  111. /* ExtensionType value from RFC7627 */
  112. # define TLSEXT_TYPE_extended_master_secret 23
  113. /* ExtensionType value from RFC4507 */
  114. # define TLSEXT_TYPE_session_ticket 35
  115. /* As defined for TLS1.3 */
  116. # define TLSEXT_TYPE_psk 41
  117. # define TLSEXT_TYPE_early_data 42
  118. # define TLSEXT_TYPE_supported_versions 43
  119. # define TLSEXT_TYPE_cookie 44
  120. # define TLSEXT_TYPE_psk_kex_modes 45
  121. # define TLSEXT_TYPE_certificate_authorities 47
  122. # define TLSEXT_TYPE_post_handshake_auth 49
  123. # define TLSEXT_TYPE_signature_algorithms_cert 50
  124. # define TLSEXT_TYPE_key_share 51
  125. /* Temporary extension type */
  126. # define TLSEXT_TYPE_renegotiate 0xff01
  127. # ifndef OPENSSL_NO_NEXTPROTONEG
  128. /* This is not an IANA defined extension number */
  129. # define TLSEXT_TYPE_next_proto_neg 13172
  130. # endif
  131. /* NameType value from RFC3546 */
  132. # define TLSEXT_NAMETYPE_host_name 0
  133. /* status request value from RFC3546 */
  134. # define TLSEXT_STATUSTYPE_ocsp 1
  135. /* ECPointFormat values from RFC4492 */
  136. # define TLSEXT_ECPOINTFORMAT_first 0
  137. # define TLSEXT_ECPOINTFORMAT_uncompressed 0
  138. # define TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime 1
  139. # define TLSEXT_ECPOINTFORMAT_ansiX962_compressed_char2 2
  140. # define TLSEXT_ECPOINTFORMAT_last 2
  141. /* Signature and hash algorithms from RFC5246 */
  142. # define TLSEXT_signature_anonymous 0
  143. # define TLSEXT_signature_rsa 1
  144. # define TLSEXT_signature_dsa 2
  145. # define TLSEXT_signature_ecdsa 3
  146. # define TLSEXT_signature_gostr34102001 237
  147. # define TLSEXT_signature_gostr34102012_256 238
  148. # define TLSEXT_signature_gostr34102012_512 239
  149. /* Total number of different signature algorithms */
  150. # define TLSEXT_signature_num 7
  151. # define TLSEXT_hash_none 0
  152. # define TLSEXT_hash_md5 1
  153. # define TLSEXT_hash_sha1 2
  154. # define TLSEXT_hash_sha224 3
  155. # define TLSEXT_hash_sha256 4
  156. # define TLSEXT_hash_sha384 5
  157. # define TLSEXT_hash_sha512 6
  158. # define TLSEXT_hash_gostr3411 237
  159. # define TLSEXT_hash_gostr34112012_256 238
  160. # define TLSEXT_hash_gostr34112012_512 239
  161. /* Total number of different digest algorithms */
  162. # define TLSEXT_hash_num 10
  163. /* Flag set for unrecognised algorithms */
  164. # define TLSEXT_nid_unknown 0x1000000
  165. /* ECC curves */
  166. # define TLSEXT_curve_P_256 23
  167. # define TLSEXT_curve_P_384 24
  168. /* OpenSSL value to disable maximum fragment length extension */
  169. # define TLSEXT_max_fragment_length_DISABLED 0
  170. /* Allowed values for max fragment length extension */
  171. # define TLSEXT_max_fragment_length_512 1
  172. # define TLSEXT_max_fragment_length_1024 2
  173. # define TLSEXT_max_fragment_length_2048 3
  174. # define TLSEXT_max_fragment_length_4096 4
  175. int SSL_CTX_set_tlsext_max_fragment_length(SSL_CTX *ctx, uint8_t mode);
  176. int SSL_set_tlsext_max_fragment_length(SSL *ssl, uint8_t mode);
  177. # define TLSEXT_MAXLEN_host_name 255
  178. __owur const char *SSL_get_servername(const SSL *s, const int type);
  179. __owur int SSL_get_servername_type(const SSL *s);
  180. /*
  181. * SSL_export_keying_material exports a value derived from the master secret,
  182. * as specified in RFC 5705. It writes |olen| bytes to |out| given a label and
  183. * optional context. (Since a zero length context is allowed, the |use_context|
  184. * flag controls whether a context is included.) It returns 1 on success and
  185. * 0 or -1 otherwise.
  186. */
  187. __owur int SSL_export_keying_material(SSL *s, unsigned char *out, size_t olen,
  188. const char *label, size_t llen,
  189. const unsigned char *context,
  190. size_t contextlen, int use_context);
  191. int SSL_get_peer_signature_type_nid(const SSL *s, int *pnid);
  192. int SSL_get_sigalgs(SSL *s, int idx,
  193. int *psign, int *phash, int *psignandhash,
  194. unsigned char *rsig, unsigned char *rhash);
  195. int SSL_get_shared_sigalgs(SSL *s, int idx,
  196. int *psign, int *phash, int *psignandhash,
  197. unsigned char *rsig, unsigned char *rhash);
  198. __owur int SSL_check_chain(SSL *s, X509 *x, EVP_PKEY *pk, STACK_OF(X509) *chain);
  199. # define SSL_set_tlsext_host_name(s,name) \
  200. SSL_ctrl(s,SSL_CTRL_SET_TLSEXT_HOSTNAME,TLSEXT_NAMETYPE_host_name,\
  201. (void *)name)
  202. # define SSL_set_tlsext_debug_callback(ssl, cb) \
  203. SSL_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_DEBUG_CB,\
  204. (void (*)(void))cb)
  205. # define SSL_set_tlsext_debug_arg(ssl, arg) \
  206. SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_DEBUG_ARG,0,arg)
  207. # define SSL_get_tlsext_status_type(ssl) \
  208. SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE,0,NULL)
  209. # define SSL_set_tlsext_status_type(ssl, type) \
  210. SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE,type,NULL)
  211. # define SSL_get_tlsext_status_exts(ssl, arg) \
  212. SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_EXTS,0,arg)
  213. # define SSL_set_tlsext_status_exts(ssl, arg) \
  214. SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_EXTS,0,arg)
  215. # define SSL_get_tlsext_status_ids(ssl, arg) \
  216. SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_IDS,0,arg)
  217. # define SSL_set_tlsext_status_ids(ssl, arg) \
  218. SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_IDS,0,arg)
  219. # define SSL_get_tlsext_status_ocsp_resp(ssl, arg) \
  220. SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP,0,arg)
  221. # define SSL_set_tlsext_status_ocsp_resp(ssl, arg, arglen) \
  222. SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP,arglen,arg)
  223. # define SSL_CTX_set_tlsext_servername_callback(ctx, cb) \
  224. SSL_CTX_callback_ctrl(ctx,SSL_CTRL_SET_TLSEXT_SERVERNAME_CB,\
  225. (void (*)(void))cb)
  226. # define SSL_TLSEXT_ERR_OK 0
  227. # define SSL_TLSEXT_ERR_ALERT_WARNING 1
  228. # define SSL_TLSEXT_ERR_ALERT_FATAL 2
  229. # define SSL_TLSEXT_ERR_NOACK 3
  230. # define SSL_CTX_set_tlsext_servername_arg(ctx, arg) \
  231. SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG,0,arg)
  232. # define SSL_CTX_get_tlsext_ticket_keys(ctx, keys, keylen) \
  233. SSL_CTX_ctrl(ctx,SSL_CTRL_GET_TLSEXT_TICKET_KEYS,keylen,keys)
  234. # define SSL_CTX_set_tlsext_ticket_keys(ctx, keys, keylen) \
  235. SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TLSEXT_TICKET_KEYS,keylen,keys)
  236. # define SSL_CTX_get_tlsext_status_cb(ssl, cb) \
  237. SSL_CTX_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB,0,(void *)cb)
  238. # define SSL_CTX_set_tlsext_status_cb(ssl, cb) \
  239. SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB,\
  240. (void (*)(void))cb)
  241. # define SSL_CTX_get_tlsext_status_arg(ssl, arg) \
  242. SSL_CTX_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB_ARG,0,arg)
  243. # define SSL_CTX_set_tlsext_status_arg(ssl, arg) \
  244. SSL_CTX_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG,0,arg)
  245. # define SSL_CTX_set_tlsext_status_type(ssl, type) \
  246. SSL_CTX_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE,type,NULL)
  247. # define SSL_CTX_get_tlsext_status_type(ssl) \
  248. SSL_CTX_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE,0,NULL)
  249. # define SSL_CTX_set_tlsext_ticket_key_cb(ssl, cb) \
  250. SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB,\
  251. (void (*)(void))cb)
  252. # ifndef OPENSSL_NO_HEARTBEATS
  253. # define SSL_DTLSEXT_HB_ENABLED 0x01
  254. # define SSL_DTLSEXT_HB_DONT_SEND_REQUESTS 0x02
  255. # define SSL_DTLSEXT_HB_DONT_RECV_REQUESTS 0x04
  256. # define SSL_get_dtlsext_heartbeat_pending(ssl) \
  257. SSL_ctrl(ssl,SSL_CTRL_GET_DTLS_EXT_HEARTBEAT_PENDING,0,NULL)
  258. # define SSL_set_dtlsext_heartbeat_no_requests(ssl, arg) \
  259. SSL_ctrl(ssl,SSL_CTRL_SET_DTLS_EXT_HEARTBEAT_NO_REQUESTS,arg,NULL)
  260. # if OPENSSL_API_COMPAT < 0x10100000L
  261. # define SSL_CTRL_TLS_EXT_SEND_HEARTBEAT \
  262. SSL_CTRL_DTLS_EXT_SEND_HEARTBEAT
  263. # define SSL_CTRL_GET_TLS_EXT_HEARTBEAT_PENDING \
  264. SSL_CTRL_GET_DTLS_EXT_HEARTBEAT_PENDING
  265. # define SSL_CTRL_SET_TLS_EXT_HEARTBEAT_NO_REQUESTS \
  266. SSL_CTRL_SET_DTLS_EXT_HEARTBEAT_NO_REQUESTS
  267. # define SSL_TLSEXT_HB_ENABLED \
  268. SSL_DTLSEXT_HB_ENABLED
  269. # define SSL_TLSEXT_HB_DONT_SEND_REQUESTS \
  270. SSL_DTLSEXT_HB_DONT_SEND_REQUESTS
  271. # define SSL_TLSEXT_HB_DONT_RECV_REQUESTS \
  272. SSL_DTLSEXT_HB_DONT_RECV_REQUESTS
  273. # define SSL_get_tlsext_heartbeat_pending(ssl) \
  274. SSL_get_dtlsext_heartbeat_pending(ssl)
  275. # define SSL_set_tlsext_heartbeat_no_requests(ssl, arg) \
  276. SSL_set_dtlsext_heartbeat_no_requests(ssl,arg)
  277. # endif
  278. # endif
  279. /* PSK ciphersuites from 4279 */
  280. # define TLS1_CK_PSK_WITH_RC4_128_SHA 0x0300008A
  281. # define TLS1_CK_PSK_WITH_3DES_EDE_CBC_SHA 0x0300008B
  282. # define TLS1_CK_PSK_WITH_AES_128_CBC_SHA 0x0300008C
  283. # define TLS1_CK_PSK_WITH_AES_256_CBC_SHA 0x0300008D
  284. # define TLS1_CK_DHE_PSK_WITH_RC4_128_SHA 0x0300008E
  285. # define TLS1_CK_DHE_PSK_WITH_3DES_EDE_CBC_SHA 0x0300008F
  286. # define TLS1_CK_DHE_PSK_WITH_AES_128_CBC_SHA 0x03000090
  287. # define TLS1_CK_DHE_PSK_WITH_AES_256_CBC_SHA 0x03000091
  288. # define TLS1_CK_RSA_PSK_WITH_RC4_128_SHA 0x03000092
  289. # define TLS1_CK_RSA_PSK_WITH_3DES_EDE_CBC_SHA 0x03000093
  290. # define TLS1_CK_RSA_PSK_WITH_AES_128_CBC_SHA 0x03000094
  291. # define TLS1_CK_RSA_PSK_WITH_AES_256_CBC_SHA 0x03000095
  292. /* PSK ciphersuites from 5487 */
  293. # define TLS1_CK_PSK_WITH_AES_128_GCM_SHA256 0x030000A8
  294. # define TLS1_CK_PSK_WITH_AES_256_GCM_SHA384 0x030000A9
  295. # define TLS1_CK_DHE_PSK_WITH_AES_128_GCM_SHA256 0x030000AA
  296. # define TLS1_CK_DHE_PSK_WITH_AES_256_GCM_SHA384 0x030000AB
  297. # define TLS1_CK_RSA_PSK_WITH_AES_128_GCM_SHA256 0x030000AC
  298. # define TLS1_CK_RSA_PSK_WITH_AES_256_GCM_SHA384 0x030000AD
  299. # define TLS1_CK_PSK_WITH_AES_128_CBC_SHA256 0x030000AE
  300. # define TLS1_CK_PSK_WITH_AES_256_CBC_SHA384 0x030000AF
  301. # define TLS1_CK_PSK_WITH_NULL_SHA256 0x030000B0
  302. # define TLS1_CK_PSK_WITH_NULL_SHA384 0x030000B1
  303. # define TLS1_CK_DHE_PSK_WITH_AES_128_CBC_SHA256 0x030000B2
  304. # define TLS1_CK_DHE_PSK_WITH_AES_256_CBC_SHA384 0x030000B3
  305. # define TLS1_CK_DHE_PSK_WITH_NULL_SHA256 0x030000B4
  306. # define TLS1_CK_DHE_PSK_WITH_NULL_SHA384 0x030000B5
  307. # define TLS1_CK_RSA_PSK_WITH_AES_128_CBC_SHA256 0x030000B6
  308. # define TLS1_CK_RSA_PSK_WITH_AES_256_CBC_SHA384 0x030000B7
  309. # define TLS1_CK_RSA_PSK_WITH_NULL_SHA256 0x030000B8
  310. # define TLS1_CK_RSA_PSK_WITH_NULL_SHA384 0x030000B9
  311. /* NULL PSK ciphersuites from RFC4785 */
  312. # define TLS1_CK_PSK_WITH_NULL_SHA 0x0300002C
  313. # define TLS1_CK_DHE_PSK_WITH_NULL_SHA 0x0300002D
  314. # define TLS1_CK_RSA_PSK_WITH_NULL_SHA 0x0300002E
  315. /* AES ciphersuites from RFC3268 */
  316. # define TLS1_CK_RSA_WITH_AES_128_SHA 0x0300002F
  317. # define TLS1_CK_DH_DSS_WITH_AES_128_SHA 0x03000030
  318. # define TLS1_CK_DH_RSA_WITH_AES_128_SHA 0x03000031
  319. # define TLS1_CK_DHE_DSS_WITH_AES_128_SHA 0x03000032
  320. # define TLS1_CK_DHE_RSA_WITH_AES_128_SHA 0x03000033
  321. # define TLS1_CK_ADH_WITH_AES_128_SHA 0x03000034
  322. # define TLS1_CK_RSA_WITH_AES_256_SHA 0x03000035
  323. # define TLS1_CK_DH_DSS_WITH_AES_256_SHA 0x03000036
  324. # define TLS1_CK_DH_RSA_WITH_AES_256_SHA 0x03000037
  325. # define TLS1_CK_DHE_DSS_WITH_AES_256_SHA 0x03000038
  326. # define TLS1_CK_DHE_RSA_WITH_AES_256_SHA 0x03000039
  327. # define TLS1_CK_ADH_WITH_AES_256_SHA 0x0300003A
  328. /* TLS v1.2 ciphersuites */
  329. # define TLS1_CK_RSA_WITH_NULL_SHA256 0x0300003B
  330. # define TLS1_CK_RSA_WITH_AES_128_SHA256 0x0300003C
  331. # define TLS1_CK_RSA_WITH_AES_256_SHA256 0x0300003D
  332. # define TLS1_CK_DH_DSS_WITH_AES_128_SHA256 0x0300003E
  333. # define TLS1_CK_DH_RSA_WITH_AES_128_SHA256 0x0300003F
  334. # define TLS1_CK_DHE_DSS_WITH_AES_128_SHA256 0x03000040
  335. /* Camellia ciphersuites from RFC4132 */
  336. # define TLS1_CK_RSA_WITH_CAMELLIA_128_CBC_SHA 0x03000041
  337. # define TLS1_CK_DH_DSS_WITH_CAMELLIA_128_CBC_SHA 0x03000042
  338. # define TLS1_CK_DH_RSA_WITH_CAMELLIA_128_CBC_SHA 0x03000043
  339. # define TLS1_CK_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA 0x03000044
  340. # define TLS1_CK_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA 0x03000045
  341. # define TLS1_CK_ADH_WITH_CAMELLIA_128_CBC_SHA 0x03000046
  342. /* TLS v1.2 ciphersuites */
  343. # define TLS1_CK_DHE_RSA_WITH_AES_128_SHA256 0x03000067
  344. # define TLS1_CK_DH_DSS_WITH_AES_256_SHA256 0x03000068
  345. # define TLS1_CK_DH_RSA_WITH_AES_256_SHA256 0x03000069
  346. # define TLS1_CK_DHE_DSS_WITH_AES_256_SHA256 0x0300006A
  347. # define TLS1_CK_DHE_RSA_WITH_AES_256_SHA256 0x0300006B
  348. # define TLS1_CK_ADH_WITH_AES_128_SHA256 0x0300006C
  349. # define TLS1_CK_ADH_WITH_AES_256_SHA256 0x0300006D
  350. /* Camellia ciphersuites from RFC4132 */
  351. # define TLS1_CK_RSA_WITH_CAMELLIA_256_CBC_SHA 0x03000084
  352. # define TLS1_CK_DH_DSS_WITH_CAMELLIA_256_CBC_SHA 0x03000085
  353. # define TLS1_CK_DH_RSA_WITH_CAMELLIA_256_CBC_SHA 0x03000086
  354. # define TLS1_CK_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA 0x03000087
  355. # define TLS1_CK_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA 0x03000088
  356. # define TLS1_CK_ADH_WITH_CAMELLIA_256_CBC_SHA 0x03000089
  357. /* SEED ciphersuites from RFC4162 */
  358. # define TLS1_CK_RSA_WITH_SEED_SHA 0x03000096
  359. # define TLS1_CK_DH_DSS_WITH_SEED_SHA 0x03000097
  360. # define TLS1_CK_DH_RSA_WITH_SEED_SHA 0x03000098
  361. # define TLS1_CK_DHE_DSS_WITH_SEED_SHA 0x03000099
  362. # define TLS1_CK_DHE_RSA_WITH_SEED_SHA 0x0300009A
  363. # define TLS1_CK_ADH_WITH_SEED_SHA 0x0300009B
  364. /* TLS v1.2 GCM ciphersuites from RFC5288 */
  365. # define TLS1_CK_RSA_WITH_AES_128_GCM_SHA256 0x0300009C
  366. # define TLS1_CK_RSA_WITH_AES_256_GCM_SHA384 0x0300009D
  367. # define TLS1_CK_DHE_RSA_WITH_AES_128_GCM_SHA256 0x0300009E
  368. # define TLS1_CK_DHE_RSA_WITH_AES_256_GCM_SHA384 0x0300009F
  369. # define TLS1_CK_DH_RSA_WITH_AES_128_GCM_SHA256 0x030000A0
  370. # define TLS1_CK_DH_RSA_WITH_AES_256_GCM_SHA384 0x030000A1
  371. # define TLS1_CK_DHE_DSS_WITH_AES_128_GCM_SHA256 0x030000A2
  372. # define TLS1_CK_DHE_DSS_WITH_AES_256_GCM_SHA384 0x030000A3
  373. # define TLS1_CK_DH_DSS_WITH_AES_128_GCM_SHA256 0x030000A4
  374. # define TLS1_CK_DH_DSS_WITH_AES_256_GCM_SHA384 0x030000A5
  375. # define TLS1_CK_ADH_WITH_AES_128_GCM_SHA256 0x030000A6
  376. # define TLS1_CK_ADH_WITH_AES_256_GCM_SHA384 0x030000A7
  377. /* CCM ciphersuites from RFC6655 */
  378. # define TLS1_CK_RSA_WITH_AES_128_CCM 0x0300C09C
  379. # define TLS1_CK_RSA_WITH_AES_256_CCM 0x0300C09D
  380. # define TLS1_CK_DHE_RSA_WITH_AES_128_CCM 0x0300C09E
  381. # define TLS1_CK_DHE_RSA_WITH_AES_256_CCM 0x0300C09F
  382. # define TLS1_CK_RSA_WITH_AES_128_CCM_8 0x0300C0A0
  383. # define TLS1_CK_RSA_WITH_AES_256_CCM_8 0x0300C0A1
  384. # define TLS1_CK_DHE_RSA_WITH_AES_128_CCM_8 0x0300C0A2
  385. # define TLS1_CK_DHE_RSA_WITH_AES_256_CCM_8 0x0300C0A3
  386. # define TLS1_CK_PSK_WITH_AES_128_CCM 0x0300C0A4
  387. # define TLS1_CK_PSK_WITH_AES_256_CCM 0x0300C0A5
  388. # define TLS1_CK_DHE_PSK_WITH_AES_128_CCM 0x0300C0A6
  389. # define TLS1_CK_DHE_PSK_WITH_AES_256_CCM 0x0300C0A7
  390. # define TLS1_CK_PSK_WITH_AES_128_CCM_8 0x0300C0A8
  391. # define TLS1_CK_PSK_WITH_AES_256_CCM_8 0x0300C0A9
  392. # define TLS1_CK_DHE_PSK_WITH_AES_128_CCM_8 0x0300C0AA
  393. # define TLS1_CK_DHE_PSK_WITH_AES_256_CCM_8 0x0300C0AB
  394. /* CCM ciphersuites from RFC7251 */
  395. # define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CCM 0x0300C0AC
  396. # define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CCM 0x0300C0AD
  397. # define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CCM_8 0x0300C0AE
  398. # define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CCM_8 0x0300C0AF
  399. /* TLS 1.2 Camellia SHA-256 ciphersuites from RFC5932 */
  400. # define TLS1_CK_RSA_WITH_CAMELLIA_128_CBC_SHA256 0x030000BA
  401. # define TLS1_CK_DH_DSS_WITH_CAMELLIA_128_CBC_SHA256 0x030000BB
  402. # define TLS1_CK_DH_RSA_WITH_CAMELLIA_128_CBC_SHA256 0x030000BC
  403. # define TLS1_CK_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256 0x030000BD
  404. # define TLS1_CK_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 0x030000BE
  405. # define TLS1_CK_ADH_WITH_CAMELLIA_128_CBC_SHA256 0x030000BF
  406. # define TLS1_CK_RSA_WITH_CAMELLIA_256_CBC_SHA256 0x030000C0
  407. # define TLS1_CK_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256 0x030000C1
  408. # define TLS1_CK_DH_RSA_WITH_CAMELLIA_256_CBC_SHA256 0x030000C2
  409. # define TLS1_CK_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256 0x030000C3
  410. # define TLS1_CK_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 0x030000C4
  411. # define TLS1_CK_ADH_WITH_CAMELLIA_256_CBC_SHA256 0x030000C5
  412. /* ECC ciphersuites from RFC4492 */
  413. # define TLS1_CK_ECDH_ECDSA_WITH_NULL_SHA 0x0300C001
  414. # define TLS1_CK_ECDH_ECDSA_WITH_RC4_128_SHA 0x0300C002
  415. # define TLS1_CK_ECDH_ECDSA_WITH_DES_192_CBC3_SHA 0x0300C003
  416. # define TLS1_CK_ECDH_ECDSA_WITH_AES_128_CBC_SHA 0x0300C004
  417. # define TLS1_CK_ECDH_ECDSA_WITH_AES_256_CBC_SHA 0x0300C005
  418. # define TLS1_CK_ECDHE_ECDSA_WITH_NULL_SHA 0x0300C006
  419. # define TLS1_CK_ECDHE_ECDSA_WITH_RC4_128_SHA 0x0300C007
  420. # define TLS1_CK_ECDHE_ECDSA_WITH_DES_192_CBC3_SHA 0x0300C008
  421. # define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA 0x0300C009
  422. # define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CBC_SHA 0x0300C00A
  423. # define TLS1_CK_ECDH_RSA_WITH_NULL_SHA 0x0300C00B
  424. # define TLS1_CK_ECDH_RSA_WITH_RC4_128_SHA 0x0300C00C
  425. # define TLS1_CK_ECDH_RSA_WITH_DES_192_CBC3_SHA 0x0300C00D
  426. # define TLS1_CK_ECDH_RSA_WITH_AES_128_CBC_SHA 0x0300C00E
  427. # define TLS1_CK_ECDH_RSA_WITH_AES_256_CBC_SHA 0x0300C00F
  428. # define TLS1_CK_ECDHE_RSA_WITH_NULL_SHA 0x0300C010
  429. # define TLS1_CK_ECDHE_RSA_WITH_RC4_128_SHA 0x0300C011
  430. # define TLS1_CK_ECDHE_RSA_WITH_DES_192_CBC3_SHA 0x0300C012
  431. # define TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA 0x0300C013
  432. # define TLS1_CK_ECDHE_RSA_WITH_AES_256_CBC_SHA 0x0300C014
  433. # define TLS1_CK_ECDH_anon_WITH_NULL_SHA 0x0300C015
  434. # define TLS1_CK_ECDH_anon_WITH_RC4_128_SHA 0x0300C016
  435. # define TLS1_CK_ECDH_anon_WITH_DES_192_CBC3_SHA 0x0300C017
  436. # define TLS1_CK_ECDH_anon_WITH_AES_128_CBC_SHA 0x0300C018
  437. # define TLS1_CK_ECDH_anon_WITH_AES_256_CBC_SHA 0x0300C019
  438. /* SRP ciphersuites from RFC 5054 */
  439. # define TLS1_CK_SRP_SHA_WITH_3DES_EDE_CBC_SHA 0x0300C01A
  440. # define TLS1_CK_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA 0x0300C01B
  441. # define TLS1_CK_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA 0x0300C01C
  442. # define TLS1_CK_SRP_SHA_WITH_AES_128_CBC_SHA 0x0300C01D
  443. # define TLS1_CK_SRP_SHA_RSA_WITH_AES_128_CBC_SHA 0x0300C01E
  444. # define TLS1_CK_SRP_SHA_DSS_WITH_AES_128_CBC_SHA 0x0300C01F
  445. # define TLS1_CK_SRP_SHA_WITH_AES_256_CBC_SHA 0x0300C020
  446. # define TLS1_CK_SRP_SHA_RSA_WITH_AES_256_CBC_SHA 0x0300C021
  447. # define TLS1_CK_SRP_SHA_DSS_WITH_AES_256_CBC_SHA 0x0300C022
  448. /* ECDH HMAC based ciphersuites from RFC5289 */
  449. # define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_SHA256 0x0300C023
  450. # define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_SHA384 0x0300C024
  451. # define TLS1_CK_ECDH_ECDSA_WITH_AES_128_SHA256 0x0300C025
  452. # define TLS1_CK_ECDH_ECDSA_WITH_AES_256_SHA384 0x0300C026
  453. # define TLS1_CK_ECDHE_RSA_WITH_AES_128_SHA256 0x0300C027
  454. # define TLS1_CK_ECDHE_RSA_WITH_AES_256_SHA384 0x0300C028
  455. # define TLS1_CK_ECDH_RSA_WITH_AES_128_SHA256 0x0300C029
  456. # define TLS1_CK_ECDH_RSA_WITH_AES_256_SHA384 0x0300C02A
  457. /* ECDH GCM based ciphersuites from RFC5289 */
  458. # define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 0x0300C02B
  459. # define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 0x0300C02C
  460. # define TLS1_CK_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 0x0300C02D
  461. # define TLS1_CK_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 0x0300C02E
  462. # define TLS1_CK_ECDHE_RSA_WITH_AES_128_GCM_SHA256 0x0300C02F
  463. # define TLS1_CK_ECDHE_RSA_WITH_AES_256_GCM_SHA384 0x0300C030
  464. # define TLS1_CK_ECDH_RSA_WITH_AES_128_GCM_SHA256 0x0300C031
  465. # define TLS1_CK_ECDH_RSA_WITH_AES_256_GCM_SHA384 0x0300C032
  466. /* ECDHE PSK ciphersuites from RFC5489 */
  467. # define TLS1_CK_ECDHE_PSK_WITH_RC4_128_SHA 0x0300C033
  468. # define TLS1_CK_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA 0x0300C034
  469. # define TLS1_CK_ECDHE_PSK_WITH_AES_128_CBC_SHA 0x0300C035
  470. # define TLS1_CK_ECDHE_PSK_WITH_AES_256_CBC_SHA 0x0300C036
  471. # define TLS1_CK_ECDHE_PSK_WITH_AES_128_CBC_SHA256 0x0300C037
  472. # define TLS1_CK_ECDHE_PSK_WITH_AES_256_CBC_SHA384 0x0300C038
  473. /* NULL PSK ciphersuites from RFC4785 */
  474. # define TLS1_CK_ECDHE_PSK_WITH_NULL_SHA 0x0300C039
  475. # define TLS1_CK_ECDHE_PSK_WITH_NULL_SHA256 0x0300C03A
  476. # define TLS1_CK_ECDHE_PSK_WITH_NULL_SHA384 0x0300C03B
  477. /* Camellia-CBC ciphersuites from RFC6367 */
  478. # define TLS1_CK_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 0x0300C072
  479. # define TLS1_CK_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 0x0300C073
  480. # define TLS1_CK_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 0x0300C074
  481. # define TLS1_CK_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 0x0300C075
  482. # define TLS1_CK_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 0x0300C076
  483. # define TLS1_CK_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384 0x0300C077
  484. # define TLS1_CK_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256 0x0300C078
  485. # define TLS1_CK_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384 0x0300C079
  486. # define TLS1_CK_PSK_WITH_CAMELLIA_128_CBC_SHA256 0x0300C094
  487. # define TLS1_CK_PSK_WITH_CAMELLIA_256_CBC_SHA384 0x0300C095
  488. # define TLS1_CK_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 0x0300C096
  489. # define TLS1_CK_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 0x0300C097
  490. # define TLS1_CK_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256 0x0300C098
  491. # define TLS1_CK_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384 0x0300C099
  492. # define TLS1_CK_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 0x0300C09A
  493. # define TLS1_CK_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 0x0300C09B
  494. /* draft-ietf-tls-chacha20-poly1305-03 */
  495. # define TLS1_CK_ECDHE_RSA_WITH_CHACHA20_POLY1305 0x0300CCA8
  496. # define TLS1_CK_ECDHE_ECDSA_WITH_CHACHA20_POLY1305 0x0300CCA9
  497. # define TLS1_CK_DHE_RSA_WITH_CHACHA20_POLY1305 0x0300CCAA
  498. # define TLS1_CK_PSK_WITH_CHACHA20_POLY1305 0x0300CCAB
  499. # define TLS1_CK_ECDHE_PSK_WITH_CHACHA20_POLY1305 0x0300CCAC
  500. # define TLS1_CK_DHE_PSK_WITH_CHACHA20_POLY1305 0x0300CCAD
  501. # define TLS1_CK_RSA_PSK_WITH_CHACHA20_POLY1305 0x0300CCAE
  502. /* TLS v1.3 ciphersuites */
  503. # define TLS1_3_CK_AES_128_GCM_SHA256 0x03001301
  504. # define TLS1_3_CK_AES_256_GCM_SHA384 0x03001302
  505. # define TLS1_3_CK_CHACHA20_POLY1305_SHA256 0x03001303
  506. # define TLS1_3_CK_AES_128_CCM_SHA256 0x03001304
  507. # define TLS1_3_CK_AES_128_CCM_8_SHA256 0x03001305
  508. /* Aria ciphersuites from RFC6209 */
  509. # define TLS1_CK_RSA_WITH_ARIA_128_GCM_SHA256 0x0300C050
  510. # define TLS1_CK_RSA_WITH_ARIA_256_GCM_SHA384 0x0300C051
  511. # define TLS1_CK_DHE_RSA_WITH_ARIA_128_GCM_SHA256 0x0300C052
  512. # define TLS1_CK_DHE_RSA_WITH_ARIA_256_GCM_SHA384 0x0300C053
  513. # define TLS1_CK_DH_RSA_WITH_ARIA_128_GCM_SHA256 0x0300C054
  514. # define TLS1_CK_DH_RSA_WITH_ARIA_256_GCM_SHA384 0x0300C055
  515. # define TLS1_CK_DHE_DSS_WITH_ARIA_128_GCM_SHA256 0x0300C056
  516. # define TLS1_CK_DHE_DSS_WITH_ARIA_256_GCM_SHA384 0x0300C057
  517. # define TLS1_CK_DH_DSS_WITH_ARIA_128_GCM_SHA256 0x0300C058
  518. # define TLS1_CK_DH_DSS_WITH_ARIA_256_GCM_SHA384 0x0300C059
  519. # define TLS1_CK_DH_anon_WITH_ARIA_128_GCM_SHA256 0x0300C05A
  520. # define TLS1_CK_DH_anon_WITH_ARIA_256_GCM_SHA384 0x0300C05B
  521. # define TLS1_CK_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256 0x0300C05C
  522. # define TLS1_CK_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384 0x0300C05D
  523. # define TLS1_CK_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256 0x0300C05E
  524. # define TLS1_CK_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384 0x0300C05F
  525. # define TLS1_CK_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256 0x0300C060
  526. # define TLS1_CK_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384 0x0300C061
  527. # define TLS1_CK_ECDH_RSA_WITH_ARIA_128_GCM_SHA256 0x0300C062
  528. # define TLS1_CK_ECDH_RSA_WITH_ARIA_256_GCM_SHA384 0x0300C063
  529. # define TLS1_CK_PSK_WITH_ARIA_128_GCM_SHA256 0x0300C06A
  530. # define TLS1_CK_PSK_WITH_ARIA_256_GCM_SHA384 0x0300C06B
  531. # define TLS1_CK_DHE_PSK_WITH_ARIA_128_GCM_SHA256 0x0300C06C
  532. # define TLS1_CK_DHE_PSK_WITH_ARIA_256_GCM_SHA384 0x0300C06D
  533. # define TLS1_CK_RSA_PSK_WITH_ARIA_128_GCM_SHA256 0x0300C06E
  534. # define TLS1_CK_RSA_PSK_WITH_ARIA_256_GCM_SHA384 0x0300C06F
  535. /* a bundle of RFC standard cipher names, generated from ssl3_ciphers[] */
  536. # define TLS1_RFC_RSA_WITH_AES_128_SHA "TLS_RSA_WITH_AES_128_CBC_SHA"
  537. # define TLS1_RFC_DHE_DSS_WITH_AES_128_SHA "TLS_DHE_DSS_WITH_AES_128_CBC_SHA"
  538. # define TLS1_RFC_DHE_RSA_WITH_AES_128_SHA "TLS_DHE_RSA_WITH_AES_128_CBC_SHA"
  539. # define TLS1_RFC_ADH_WITH_AES_128_SHA "TLS_DH_anon_WITH_AES_128_CBC_SHA"
  540. # define TLS1_RFC_RSA_WITH_AES_256_SHA "TLS_RSA_WITH_AES_256_CBC_SHA"
  541. # define TLS1_RFC_DHE_DSS_WITH_AES_256_SHA "TLS_DHE_DSS_WITH_AES_256_CBC_SHA"
  542. # define TLS1_RFC_DHE_RSA_WITH_AES_256_SHA "TLS_DHE_RSA_WITH_AES_256_CBC_SHA"
  543. # define TLS1_RFC_ADH_WITH_AES_256_SHA "TLS_DH_anon_WITH_AES_256_CBC_SHA"
  544. # define TLS1_RFC_RSA_WITH_NULL_SHA256 "TLS_RSA_WITH_NULL_SHA256"
  545. # define TLS1_RFC_RSA_WITH_AES_128_SHA256 "TLS_RSA_WITH_AES_128_CBC_SHA256"
  546. # define TLS1_RFC_RSA_WITH_AES_256_SHA256 "TLS_RSA_WITH_AES_256_CBC_SHA256"
  547. # define TLS1_RFC_DHE_DSS_WITH_AES_128_SHA256 "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256"
  548. # define TLS1_RFC_DHE_RSA_WITH_AES_128_SHA256 "TLS_DHE_RSA_WITH_AES_128_CBC_SHA256"
  549. # define TLS1_RFC_DHE_DSS_WITH_AES_256_SHA256 "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256"
  550. # define TLS1_RFC_DHE_RSA_WITH_AES_256_SHA256 "TLS_DHE_RSA_WITH_AES_256_CBC_SHA256"
  551. # define TLS1_RFC_ADH_WITH_AES_128_SHA256 "TLS_DH_anon_WITH_AES_128_CBC_SHA256"
  552. # define TLS1_RFC_ADH_WITH_AES_256_SHA256 "TLS_DH_anon_WITH_AES_256_CBC_SHA256"
  553. # define TLS1_RFC_RSA_WITH_AES_128_GCM_SHA256 "TLS_RSA_WITH_AES_128_GCM_SHA256"
  554. # define TLS1_RFC_RSA_WITH_AES_256_GCM_SHA384 "TLS_RSA_WITH_AES_256_GCM_SHA384"
  555. # define TLS1_RFC_DHE_RSA_WITH_AES_128_GCM_SHA256 "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256"
  556. # define TLS1_RFC_DHE_RSA_WITH_AES_256_GCM_SHA384 "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384"
  557. # define TLS1_RFC_DHE_DSS_WITH_AES_128_GCM_SHA256 "TLS_DHE_DSS_WITH_AES_128_GCM_SHA256"
  558. # define TLS1_RFC_DHE_DSS_WITH_AES_256_GCM_SHA384 "TLS_DHE_DSS_WITH_AES_256_GCM_SHA384"
  559. # define TLS1_RFC_ADH_WITH_AES_128_GCM_SHA256 "TLS_DH_anon_WITH_AES_128_GCM_SHA256"
  560. # define TLS1_RFC_ADH_WITH_AES_256_GCM_SHA384 "TLS_DH_anon_WITH_AES_256_GCM_SHA384"
  561. # define TLS1_RFC_RSA_WITH_AES_128_CCM "TLS_RSA_WITH_AES_128_CCM"
  562. # define TLS1_RFC_RSA_WITH_AES_256_CCM "TLS_RSA_WITH_AES_256_CCM"
  563. # define TLS1_RFC_DHE_RSA_WITH_AES_128_CCM "TLS_DHE_RSA_WITH_AES_128_CCM"
  564. # define TLS1_RFC_DHE_RSA_WITH_AES_256_CCM "TLS_DHE_RSA_WITH_AES_256_CCM"
  565. # define TLS1_RFC_RSA_WITH_AES_128_CCM_8 "TLS_RSA_WITH_AES_128_CCM_8"
  566. # define TLS1_RFC_RSA_WITH_AES_256_CCM_8 "TLS_RSA_WITH_AES_256_CCM_8"
  567. # define TLS1_RFC_DHE_RSA_WITH_AES_128_CCM_8 "TLS_DHE_RSA_WITH_AES_128_CCM_8"
  568. # define TLS1_RFC_DHE_RSA_WITH_AES_256_CCM_8 "TLS_DHE_RSA_WITH_AES_256_CCM_8"
  569. # define TLS1_RFC_PSK_WITH_AES_128_CCM "TLS_PSK_WITH_AES_128_CCM"
  570. # define TLS1_RFC_PSK_WITH_AES_256_CCM "TLS_PSK_WITH_AES_256_CCM"
  571. # define TLS1_RFC_DHE_PSK_WITH_AES_128_CCM "TLS_DHE_PSK_WITH_AES_128_CCM"
  572. # define TLS1_RFC_DHE_PSK_WITH_AES_256_CCM "TLS_DHE_PSK_WITH_AES_256_CCM"
  573. # define TLS1_RFC_PSK_WITH_AES_128_CCM_8 "TLS_PSK_WITH_AES_128_CCM_8"
  574. # define TLS1_RFC_PSK_WITH_AES_256_CCM_8 "TLS_PSK_WITH_AES_256_CCM_8"
  575. # define TLS1_RFC_DHE_PSK_WITH_AES_128_CCM_8 "TLS_PSK_DHE_WITH_AES_128_CCM_8"
  576. # define TLS1_RFC_DHE_PSK_WITH_AES_256_CCM_8 "TLS_PSK_DHE_WITH_AES_256_CCM_8"
  577. # define TLS1_RFC_ECDHE_ECDSA_WITH_AES_128_CCM "TLS_ECDHE_ECDSA_WITH_AES_128_CCM"
  578. # define TLS1_RFC_ECDHE_ECDSA_WITH_AES_256_CCM "TLS_ECDHE_ECDSA_WITH_AES_256_CCM"
  579. # define TLS1_RFC_ECDHE_ECDSA_WITH_AES_128_CCM_8 "TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8"
  580. # define TLS1_RFC_ECDHE_ECDSA_WITH_AES_256_CCM_8 "TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8"
  581. # define TLS1_3_RFC_AES_128_GCM_SHA256 "TLS_AES_128_GCM_SHA256"
  582. # define TLS1_3_RFC_AES_256_GCM_SHA384 "TLS_AES_256_GCM_SHA384"
  583. # define TLS1_3_RFC_CHACHA20_POLY1305_SHA256 "TLS_CHACHA20_POLY1305_SHA256"
  584. # define TLS1_3_RFC_AES_128_CCM_SHA256 "TLS_AES_128_CCM_SHA256"
  585. # define TLS1_3_RFC_AES_128_CCM_8_SHA256 "TLS_AES_128_CCM_8_SHA256"
  586. # define TLS1_RFC_ECDHE_ECDSA_WITH_NULL_SHA "TLS_ECDHE_ECDSA_WITH_NULL_SHA"
  587. # define TLS1_RFC_ECDHE_ECDSA_WITH_DES_192_CBC3_SHA "TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA"
  588. # define TLS1_RFC_ECDHE_ECDSA_WITH_AES_128_CBC_SHA "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA"
  589. # define TLS1_RFC_ECDHE_ECDSA_WITH_AES_256_CBC_SHA "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA"
  590. # define TLS1_RFC_ECDHE_RSA_WITH_NULL_SHA "TLS_ECDHE_RSA_WITH_NULL_SHA"
  591. # define TLS1_RFC_ECDHE_RSA_WITH_DES_192_CBC3_SHA "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA"
  592. # define TLS1_RFC_ECDHE_RSA_WITH_AES_128_CBC_SHA "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA"
  593. # define TLS1_RFC_ECDHE_RSA_WITH_AES_256_CBC_SHA "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA"
  594. # define TLS1_RFC_ECDH_anon_WITH_NULL_SHA "TLS_ECDH_anon_WITH_NULL_SHA"
  595. # define TLS1_RFC_ECDH_anon_WITH_DES_192_CBC3_SHA "TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA"
  596. # define TLS1_RFC_ECDH_anon_WITH_AES_128_CBC_SHA "TLS_ECDH_anon_WITH_AES_128_CBC_SHA"
  597. # define TLS1_RFC_ECDH_anon_WITH_AES_256_CBC_SHA "TLS_ECDH_anon_WITH_AES_256_CBC_SHA"
  598. # define TLS1_RFC_ECDHE_ECDSA_WITH_AES_128_SHA256 "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256"
  599. # define TLS1_RFC_ECDHE_ECDSA_WITH_AES_256_SHA384 "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384"
  600. # define TLS1_RFC_ECDHE_RSA_WITH_AES_128_SHA256 "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256"
  601. # define TLS1_RFC_ECDHE_RSA_WITH_AES_256_SHA384 "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384"
  602. # define TLS1_RFC_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256"
  603. # define TLS1_RFC_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384"
  604. # define TLS1_RFC_ECDHE_RSA_WITH_AES_128_GCM_SHA256 "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"
  605. # define TLS1_RFC_ECDHE_RSA_WITH_AES_256_GCM_SHA384 "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"
  606. # define TLS1_RFC_PSK_WITH_NULL_SHA "TLS_PSK_WITH_NULL_SHA"
  607. # define TLS1_RFC_DHE_PSK_WITH_NULL_SHA "TLS_DHE_PSK_WITH_NULL_SHA"
  608. # define TLS1_RFC_RSA_PSK_WITH_NULL_SHA "TLS_RSA_PSK_WITH_NULL_SHA"
  609. # define TLS1_RFC_PSK_WITH_3DES_EDE_CBC_SHA "TLS_PSK_WITH_3DES_EDE_CBC_SHA"
  610. # define TLS1_RFC_PSK_WITH_AES_128_CBC_SHA "TLS_PSK_WITH_AES_128_CBC_SHA"
  611. # define TLS1_RFC_PSK_WITH_AES_256_CBC_SHA "TLS_PSK_WITH_AES_256_CBC_SHA"
  612. # define TLS1_RFC_DHE_PSK_WITH_3DES_EDE_CBC_SHA "TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA"
  613. # define TLS1_RFC_DHE_PSK_WITH_AES_128_CBC_SHA "TLS_DHE_PSK_WITH_AES_128_CBC_SHA"
  614. # define TLS1_RFC_DHE_PSK_WITH_AES_256_CBC_SHA "TLS_DHE_PSK_WITH_AES_256_CBC_SHA"
  615. # define TLS1_RFC_RSA_PSK_WITH_3DES_EDE_CBC_SHA "TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA"
  616. # define TLS1_RFC_RSA_PSK_WITH_AES_128_CBC_SHA "TLS_RSA_PSK_WITH_AES_128_CBC_SHA"
  617. # define TLS1_RFC_RSA_PSK_WITH_AES_256_CBC_SHA "TLS_RSA_PSK_WITH_AES_256_CBC_SHA"
  618. # define TLS1_RFC_PSK_WITH_AES_128_GCM_SHA256 "TLS_PSK_WITH_AES_128_GCM_SHA256"
  619. # define TLS1_RFC_PSK_WITH_AES_256_GCM_SHA384 "TLS_PSK_WITH_AES_256_GCM_SHA384"
  620. # define TLS1_RFC_DHE_PSK_WITH_AES_128_GCM_SHA256 "TLS_DHE_PSK_WITH_AES_128_GCM_SHA256"
  621. # define TLS1_RFC_DHE_PSK_WITH_AES_256_GCM_SHA384 "TLS_DHE_PSK_WITH_AES_256_GCM_SHA384"
  622. # define TLS1_RFC_RSA_PSK_WITH_AES_128_GCM_SHA256 "TLS_RSA_PSK_WITH_AES_128_GCM_SHA256"
  623. # define TLS1_RFC_RSA_PSK_WITH_AES_256_GCM_SHA384 "TLS_RSA_PSK_WITH_AES_256_GCM_SHA384"
  624. # define TLS1_RFC_PSK_WITH_AES_128_CBC_SHA256 "TLS_PSK_WITH_AES_128_CBC_SHA256"
  625. # define TLS1_RFC_PSK_WITH_AES_256_CBC_SHA384 "TLS_PSK_WITH_AES_256_CBC_SHA384"
  626. # define TLS1_RFC_PSK_WITH_NULL_SHA256 "TLS_PSK_WITH_NULL_SHA256"
  627. # define TLS1_RFC_PSK_WITH_NULL_SHA384 "TLS_PSK_WITH_NULL_SHA384"
  628. # define TLS1_RFC_DHE_PSK_WITH_AES_128_CBC_SHA256 "TLS_DHE_PSK_WITH_AES_128_CBC_SHA256"
  629. # define TLS1_RFC_DHE_PSK_WITH_AES_256_CBC_SHA384 "TLS_DHE_PSK_WITH_AES_256_CBC_SHA384"
  630. # define TLS1_RFC_DHE_PSK_WITH_NULL_SHA256 "TLS_DHE_PSK_WITH_NULL_SHA256"
  631. # define TLS1_RFC_DHE_PSK_WITH_NULL_SHA384 "TLS_DHE_PSK_WITH_NULL_SHA384"
  632. # define TLS1_RFC_RSA_PSK_WITH_AES_128_CBC_SHA256 "TLS_RSA_PSK_WITH_AES_128_CBC_SHA256"
  633. # define TLS1_RFC_RSA_PSK_WITH_AES_256_CBC_SHA384 "TLS_RSA_PSK_WITH_AES_256_CBC_SHA384"
  634. # define TLS1_RFC_RSA_PSK_WITH_NULL_SHA256 "TLS_RSA_PSK_WITH_NULL_SHA256"
  635. # define TLS1_RFC_RSA_PSK_WITH_NULL_SHA384 "TLS_RSA_PSK_WITH_NULL_SHA384"
  636. # define TLS1_RFC_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA "TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA"
  637. # define TLS1_RFC_ECDHE_PSK_WITH_AES_128_CBC_SHA "TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA"
  638. # define TLS1_RFC_ECDHE_PSK_WITH_AES_256_CBC_SHA "TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA"
  639. # define TLS1_RFC_ECDHE_PSK_WITH_AES_128_CBC_SHA256 "TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256"
  640. # define TLS1_RFC_ECDHE_PSK_WITH_AES_256_CBC_SHA384 "TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384"
  641. # define TLS1_RFC_ECDHE_PSK_WITH_NULL_SHA "TLS_ECDHE_PSK_WITH_NULL_SHA"
  642. # define TLS1_RFC_ECDHE_PSK_WITH_NULL_SHA256 "TLS_ECDHE_PSK_WITH_NULL_SHA256"
  643. # define TLS1_RFC_ECDHE_PSK_WITH_NULL_SHA384 "TLS_ECDHE_PSK_WITH_NULL_SHA384"
  644. # define TLS1_RFC_SRP_SHA_WITH_3DES_EDE_CBC_SHA "TLS_SRP_SHA_WITH_3DES_EDE_CBC_SHA"
  645. # define TLS1_RFC_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA "TLS_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA"
  646. # define TLS1_RFC_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA "TLS_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA"
  647. # define TLS1_RFC_SRP_SHA_WITH_AES_128_CBC_SHA "TLS_SRP_SHA_WITH_AES_128_CBC_SHA"
  648. # define TLS1_RFC_SRP_SHA_RSA_WITH_AES_128_CBC_SHA "TLS_SRP_SHA_RSA_WITH_AES_128_CBC_SHA"
  649. # define TLS1_RFC_SRP_SHA_DSS_WITH_AES_128_CBC_SHA "TLS_SRP_SHA_DSS_WITH_AES_128_CBC_SHA"
  650. # define TLS1_RFC_SRP_SHA_WITH_AES_256_CBC_SHA "TLS_SRP_SHA_WITH_AES_256_CBC_SHA"
  651. # define TLS1_RFC_SRP_SHA_RSA_WITH_AES_256_CBC_SHA "TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA"
  652. # define TLS1_RFC_SRP_SHA_DSS_WITH_AES_256_CBC_SHA "TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA"
  653. # define TLS1_RFC_DHE_RSA_WITH_CHACHA20_POLY1305 "TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256"
  654. # define TLS1_RFC_ECDHE_RSA_WITH_CHACHA20_POLY1305 "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256"
  655. # define TLS1_RFC_ECDHE_ECDSA_WITH_CHACHA20_POLY1305 "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256"
  656. # define TLS1_RFC_PSK_WITH_CHACHA20_POLY1305 "TLS_PSK_WITH_CHACHA20_POLY1305_SHA256"
  657. # define TLS1_RFC_ECDHE_PSK_WITH_CHACHA20_POLY1305 "TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256"
  658. # define TLS1_RFC_DHE_PSK_WITH_CHACHA20_POLY1305 "TLS_DHE_PSK_WITH_CHACHA20_POLY1305_SHA256"
  659. # define TLS1_RFC_RSA_PSK_WITH_CHACHA20_POLY1305 "TLS_RSA_PSK_WITH_CHACHA20_POLY1305_SHA256"
  660. # define TLS1_RFC_RSA_WITH_CAMELLIA_128_CBC_SHA256 "TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256"
  661. # define TLS1_RFC_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256 "TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256"
  662. # define TLS1_RFC_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 "TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256"
  663. # define TLS1_RFC_ADH_WITH_CAMELLIA_128_CBC_SHA256 "TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA256"
  664. # define TLS1_RFC_RSA_WITH_CAMELLIA_256_CBC_SHA256 "TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256"
  665. # define TLS1_RFC_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256 "TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256"
  666. # define TLS1_RFC_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 "TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256"
  667. # define TLS1_RFC_ADH_WITH_CAMELLIA_256_CBC_SHA256 "TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA256"
  668. # define TLS1_RFC_RSA_WITH_CAMELLIA_256_CBC_SHA "TLS_RSA_WITH_CAMELLIA_256_CBC_SHA"
  669. # define TLS1_RFC_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA "TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA"
  670. # define TLS1_RFC_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA "TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA"
  671. # define TLS1_RFC_ADH_WITH_CAMELLIA_256_CBC_SHA "TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA"
  672. # define TLS1_RFC_RSA_WITH_CAMELLIA_128_CBC_SHA "TLS_RSA_WITH_CAMELLIA_128_CBC_SHA"
  673. # define TLS1_RFC_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA "TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA"
  674. # define TLS1_RFC_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA "TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA"
  675. # define TLS1_RFC_ADH_WITH_CAMELLIA_128_CBC_SHA "TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA"
  676. # define TLS1_RFC_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 "TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256"
  677. # define TLS1_RFC_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 "TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384"
  678. # define TLS1_RFC_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 "TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256"
  679. # define TLS1_RFC_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384 "TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384"
  680. # define TLS1_RFC_PSK_WITH_CAMELLIA_128_CBC_SHA256 "TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256"
  681. # define TLS1_RFC_PSK_WITH_CAMELLIA_256_CBC_SHA384 "TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384"
  682. # define TLS1_RFC_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 "TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256"
  683. # define TLS1_RFC_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 "TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384"
  684. # define TLS1_RFC_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256 "TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256"
  685. # define TLS1_RFC_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384 "TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384"
  686. # define TLS1_RFC_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 "TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256"
  687. # define TLS1_RFC_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 "TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384"
  688. # define TLS1_RFC_RSA_WITH_SEED_SHA "TLS_RSA_WITH_SEED_CBC_SHA"
  689. # define TLS1_RFC_DHE_DSS_WITH_SEED_SHA "TLS_DHE_DSS_WITH_SEED_CBC_SHA"
  690. # define TLS1_RFC_DHE_RSA_WITH_SEED_SHA "TLS_DHE_RSA_WITH_SEED_CBC_SHA"
  691. # define TLS1_RFC_ADH_WITH_SEED_SHA "TLS_DH_anon_WITH_SEED_CBC_SHA"
  692. # define TLS1_RFC_ECDHE_PSK_WITH_RC4_128_SHA "TLS_ECDHE_PSK_WITH_RC4_128_SHA"
  693. # define TLS1_RFC_ECDH_anon_WITH_RC4_128_SHA "TLS_ECDH_anon_WITH_RC4_128_SHA"
  694. # define TLS1_RFC_ECDHE_ECDSA_WITH_RC4_128_SHA "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA"
  695. # define TLS1_RFC_ECDHE_RSA_WITH_RC4_128_SHA "TLS_ECDHE_RSA_WITH_RC4_128_SHA"
  696. # define TLS1_RFC_PSK_WITH_RC4_128_SHA "TLS_PSK_WITH_RC4_128_SHA"
  697. # define TLS1_RFC_RSA_PSK_WITH_RC4_128_SHA "TLS_RSA_PSK_WITH_RC4_128_SHA"
  698. # define TLS1_RFC_DHE_PSK_WITH_RC4_128_SHA "TLS_DHE_PSK_WITH_RC4_128_SHA"
  699. # define TLS1_RFC_RSA_WITH_ARIA_128_GCM_SHA256 "TLS_RSA_WITH_ARIA_128_GCM_SHA256"
  700. # define TLS1_RFC_RSA_WITH_ARIA_256_GCM_SHA384 "TLS_RSA_WITH_ARIA_256_GCM_SHA384"
  701. # define TLS1_RFC_DHE_RSA_WITH_ARIA_128_GCM_SHA256 "TLS_DHE_RSA_WITH_ARIA_128_GCM_SHA256"
  702. # define TLS1_RFC_DHE_RSA_WITH_ARIA_256_GCM_SHA384 "TLS_DHE_RSA_WITH_ARIA_256_GCM_SHA384"
  703. # define TLS1_RFC_DH_RSA_WITH_ARIA_128_GCM_SHA256 "TLS_DH_RSA_WITH_ARIA_128_GCM_SHA256"
  704. # define TLS1_RFC_DH_RSA_WITH_ARIA_256_GCM_SHA384 "TLS_DH_RSA_WITH_ARIA_256_GCM_SHA384"
  705. # define TLS1_RFC_DHE_DSS_WITH_ARIA_128_GCM_SHA256 "TLS_DHE_DSS_WITH_ARIA_128_GCM_SHA256"
  706. # define TLS1_RFC_DHE_DSS_WITH_ARIA_256_GCM_SHA384 "TLS_DHE_DSS_WITH_ARIA_256_GCM_SHA384"
  707. # define TLS1_RFC_DH_DSS_WITH_ARIA_128_GCM_SHA256 "TLS_DH_DSS_WITH_ARIA_128_GCM_SHA256"
  708. # define TLS1_RFC_DH_DSS_WITH_ARIA_256_GCM_SHA384 "TLS_DH_DSS_WITH_ARIA_256_GCM_SHA384"
  709. # define TLS1_RFC_DH_anon_WITH_ARIA_128_GCM_SHA256 "TLS_DH_anon_WITH_ARIA_128_GCM_SHA256"
  710. # define TLS1_RFC_DH_anon_WITH_ARIA_256_GCM_SHA384 "TLS_DH_anon_WITH_ARIA_256_GCM_SHA384"
  711. # define TLS1_RFC_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256 "TLS_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256"
  712. # define TLS1_RFC_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384 "TLS_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384"
  713. # define TLS1_RFC_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256 "TLS_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256"
  714. # define TLS1_RFC_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384 "TLS_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384"
  715. # define TLS1_RFC_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256 "TLS_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256"
  716. # define TLS1_RFC_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384 "TLS_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384"
  717. # define TLS1_RFC_ECDH_RSA_WITH_ARIA_128_GCM_SHA256 "TLS_ECDH_RSA_WITH_ARIA_128_GCM_SHA256"
  718. # define TLS1_RFC_ECDH_RSA_WITH_ARIA_256_GCM_SHA384 "TLS_ECDH_RSA_WITH_ARIA_256_GCM_SHA384"
  719. # define TLS1_RFC_PSK_WITH_ARIA_128_GCM_SHA256 "TLS_PSK_WITH_ARIA_128_GCM_SHA256"
  720. # define TLS1_RFC_PSK_WITH_ARIA_256_GCM_SHA384 "TLS_PSK_WITH_ARIA_256_GCM_SHA384"
  721. # define TLS1_RFC_DHE_PSK_WITH_ARIA_128_GCM_SHA256 "TLS_DHE_PSK_WITH_ARIA_128_GCM_SHA256"
  722. # define TLS1_RFC_DHE_PSK_WITH_ARIA_256_GCM_SHA384 "TLS_DHE_PSK_WITH_ARIA_256_GCM_SHA384"
  723. # define TLS1_RFC_RSA_PSK_WITH_ARIA_128_GCM_SHA256 "TLS_RSA_PSK_WITH_ARIA_128_GCM_SHA256"
  724. # define TLS1_RFC_RSA_PSK_WITH_ARIA_256_GCM_SHA384 "TLS_RSA_PSK_WITH_ARIA_256_GCM_SHA384"
  725. /*
  726. * XXX Backward compatibility alert: Older versions of OpenSSL gave some DHE
  727. * ciphers names with "EDH" instead of "DHE". Going forward, we should be
  728. * using DHE everywhere, though we may indefinitely maintain aliases for
  729. * users or configurations that used "EDH"
  730. */
  731. # define TLS1_TXT_DHE_DSS_WITH_RC4_128_SHA "DHE-DSS-RC4-SHA"
  732. # define TLS1_TXT_PSK_WITH_NULL_SHA "PSK-NULL-SHA"
  733. # define TLS1_TXT_DHE_PSK_WITH_NULL_SHA "DHE-PSK-NULL-SHA"
  734. # define TLS1_TXT_RSA_PSK_WITH_NULL_SHA "RSA-PSK-NULL-SHA"
  735. /* AES ciphersuites from RFC3268 */
  736. # define TLS1_TXT_RSA_WITH_AES_128_SHA "AES128-SHA"
  737. # define TLS1_TXT_DH_DSS_WITH_AES_128_SHA "DH-DSS-AES128-SHA"
  738. # define TLS1_TXT_DH_RSA_WITH_AES_128_SHA "DH-RSA-AES128-SHA"
  739. # define TLS1_TXT_DHE_DSS_WITH_AES_128_SHA "DHE-DSS-AES128-SHA"
  740. # define TLS1_TXT_DHE_RSA_WITH_AES_128_SHA "DHE-RSA-AES128-SHA"
  741. # define TLS1_TXT_ADH_WITH_AES_128_SHA "ADH-AES128-SHA"
  742. # define TLS1_TXT_RSA_WITH_AES_256_SHA "AES256-SHA"
  743. # define TLS1_TXT_DH_DSS_WITH_AES_256_SHA "DH-DSS-AES256-SHA"
  744. # define TLS1_TXT_DH_RSA_WITH_AES_256_SHA "DH-RSA-AES256-SHA"
  745. # define TLS1_TXT_DHE_DSS_WITH_AES_256_SHA "DHE-DSS-AES256-SHA"
  746. # define TLS1_TXT_DHE_RSA_WITH_AES_256_SHA "DHE-RSA-AES256-SHA"
  747. # define TLS1_TXT_ADH_WITH_AES_256_SHA "ADH-AES256-SHA"
  748. /* ECC ciphersuites from RFC4492 */
  749. # define TLS1_TXT_ECDH_ECDSA_WITH_NULL_SHA "ECDH-ECDSA-NULL-SHA"
  750. # define TLS1_TXT_ECDH_ECDSA_WITH_RC4_128_SHA "ECDH-ECDSA-RC4-SHA"
  751. # define TLS1_TXT_ECDH_ECDSA_WITH_DES_192_CBC3_SHA "ECDH-ECDSA-DES-CBC3-SHA"
  752. # define TLS1_TXT_ECDH_ECDSA_WITH_AES_128_CBC_SHA "ECDH-ECDSA-AES128-SHA"
  753. # define TLS1_TXT_ECDH_ECDSA_WITH_AES_256_CBC_SHA "ECDH-ECDSA-AES256-SHA"
  754. # define TLS1_TXT_ECDHE_ECDSA_WITH_NULL_SHA "ECDHE-ECDSA-NULL-SHA"
  755. # define TLS1_TXT_ECDHE_ECDSA_WITH_RC4_128_SHA "ECDHE-ECDSA-RC4-SHA"
  756. # define TLS1_TXT_ECDHE_ECDSA_WITH_DES_192_CBC3_SHA "ECDHE-ECDSA-DES-CBC3-SHA"
  757. # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA "ECDHE-ECDSA-AES128-SHA"
  758. # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CBC_SHA "ECDHE-ECDSA-AES256-SHA"
  759. # define TLS1_TXT_ECDH_RSA_WITH_NULL_SHA "ECDH-RSA-NULL-SHA"
  760. # define TLS1_TXT_ECDH_RSA_WITH_RC4_128_SHA "ECDH-RSA-RC4-SHA"
  761. # define TLS1_TXT_ECDH_RSA_WITH_DES_192_CBC3_SHA "ECDH-RSA-DES-CBC3-SHA"
  762. # define TLS1_TXT_ECDH_RSA_WITH_AES_128_CBC_SHA "ECDH-RSA-AES128-SHA"
  763. # define TLS1_TXT_ECDH_RSA_WITH_AES_256_CBC_SHA "ECDH-RSA-AES256-SHA"
  764. # define TLS1_TXT_ECDHE_RSA_WITH_NULL_SHA "ECDHE-RSA-NULL-SHA"
  765. # define TLS1_TXT_ECDHE_RSA_WITH_RC4_128_SHA "ECDHE-RSA-RC4-SHA"
  766. # define TLS1_TXT_ECDHE_RSA_WITH_DES_192_CBC3_SHA "ECDHE-RSA-DES-CBC3-SHA"
  767. # define TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA "ECDHE-RSA-AES128-SHA"
  768. # define TLS1_TXT_ECDHE_RSA_WITH_AES_256_CBC_SHA "ECDHE-RSA-AES256-SHA"
  769. # define TLS1_TXT_ECDH_anon_WITH_NULL_SHA "AECDH-NULL-SHA"
  770. # define TLS1_TXT_ECDH_anon_WITH_RC4_128_SHA "AECDH-RC4-SHA"
  771. # define TLS1_TXT_ECDH_anon_WITH_DES_192_CBC3_SHA "AECDH-DES-CBC3-SHA"
  772. # define TLS1_TXT_ECDH_anon_WITH_AES_128_CBC_SHA "AECDH-AES128-SHA"
  773. # define TLS1_TXT_ECDH_anon_WITH_AES_256_CBC_SHA "AECDH-AES256-SHA"
  774. /* PSK ciphersuites from RFC 4279 */
  775. # define TLS1_TXT_PSK_WITH_RC4_128_SHA "PSK-RC4-SHA"
  776. # define TLS1_TXT_PSK_WITH_3DES_EDE_CBC_SHA "PSK-3DES-EDE-CBC-SHA"
  777. # define TLS1_TXT_PSK_WITH_AES_128_CBC_SHA "PSK-AES128-CBC-SHA"
  778. # define TLS1_TXT_PSK_WITH_AES_256_CBC_SHA "PSK-AES256-CBC-SHA"
  779. # define TLS1_TXT_DHE_PSK_WITH_RC4_128_SHA "DHE-PSK-RC4-SHA"
  780. # define TLS1_TXT_DHE_PSK_WITH_3DES_EDE_CBC_SHA "DHE-PSK-3DES-EDE-CBC-SHA"
  781. # define TLS1_TXT_DHE_PSK_WITH_AES_128_CBC_SHA "DHE-PSK-AES128-CBC-SHA"
  782. # define TLS1_TXT_DHE_PSK_WITH_AES_256_CBC_SHA "DHE-PSK-AES256-CBC-SHA"
  783. # define TLS1_TXT_RSA_PSK_WITH_RC4_128_SHA "RSA-PSK-RC4-SHA"
  784. # define TLS1_TXT_RSA_PSK_WITH_3DES_EDE_CBC_SHA "RSA-PSK-3DES-EDE-CBC-SHA"
  785. # define TLS1_TXT_RSA_PSK_WITH_AES_128_CBC_SHA "RSA-PSK-AES128-CBC-SHA"
  786. # define TLS1_TXT_RSA_PSK_WITH_AES_256_CBC_SHA "RSA-PSK-AES256-CBC-SHA"
  787. /* PSK ciphersuites from RFC 5487 */
  788. # define TLS1_TXT_PSK_WITH_AES_128_GCM_SHA256 "PSK-AES128-GCM-SHA256"
  789. # define TLS1_TXT_PSK_WITH_AES_256_GCM_SHA384 "PSK-AES256-GCM-SHA384"
  790. # define TLS1_TXT_DHE_PSK_WITH_AES_128_GCM_SHA256 "DHE-PSK-AES128-GCM-SHA256"
  791. # define TLS1_TXT_DHE_PSK_WITH_AES_256_GCM_SHA384 "DHE-PSK-AES256-GCM-SHA384"
  792. # define TLS1_TXT_RSA_PSK_WITH_AES_128_GCM_SHA256 "RSA-PSK-AES128-GCM-SHA256"
  793. # define TLS1_TXT_RSA_PSK_WITH_AES_256_GCM_SHA384 "RSA-PSK-AES256-GCM-SHA384"
  794. # define TLS1_TXT_PSK_WITH_AES_128_CBC_SHA256 "PSK-AES128-CBC-SHA256"
  795. # define TLS1_TXT_PSK_WITH_AES_256_CBC_SHA384 "PSK-AES256-CBC-SHA384"
  796. # define TLS1_TXT_PSK_WITH_NULL_SHA256 "PSK-NULL-SHA256"
  797. # define TLS1_TXT_PSK_WITH_NULL_SHA384 "PSK-NULL-SHA384"
  798. # define TLS1_TXT_DHE_PSK_WITH_AES_128_CBC_SHA256 "DHE-PSK-AES128-CBC-SHA256"
  799. # define TLS1_TXT_DHE_PSK_WITH_AES_256_CBC_SHA384 "DHE-PSK-AES256-CBC-SHA384"
  800. # define TLS1_TXT_DHE_PSK_WITH_NULL_SHA256 "DHE-PSK-NULL-SHA256"
  801. # define TLS1_TXT_DHE_PSK_WITH_NULL_SHA384 "DHE-PSK-NULL-SHA384"
  802. # define TLS1_TXT_RSA_PSK_WITH_AES_128_CBC_SHA256 "RSA-PSK-AES128-CBC-SHA256"
  803. # define TLS1_TXT_RSA_PSK_WITH_AES_256_CBC_SHA384 "RSA-PSK-AES256-CBC-SHA384"
  804. # define TLS1_TXT_RSA_PSK_WITH_NULL_SHA256 "RSA-PSK-NULL-SHA256"
  805. # define TLS1_TXT_RSA_PSK_WITH_NULL_SHA384 "RSA-PSK-NULL-SHA384"
  806. /* SRP ciphersuite from RFC 5054 */
  807. # define TLS1_TXT_SRP_SHA_WITH_3DES_EDE_CBC_SHA "SRP-3DES-EDE-CBC-SHA"
  808. # define TLS1_TXT_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA "SRP-RSA-3DES-EDE-CBC-SHA"
  809. # define TLS1_TXT_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA "SRP-DSS-3DES-EDE-CBC-SHA"
  810. # define TLS1_TXT_SRP_SHA_WITH_AES_128_CBC_SHA "SRP-AES-128-CBC-SHA"
  811. # define TLS1_TXT_SRP_SHA_RSA_WITH_AES_128_CBC_SHA "SRP-RSA-AES-128-CBC-SHA"
  812. # define TLS1_TXT_SRP_SHA_DSS_WITH_AES_128_CBC_SHA "SRP-DSS-AES-128-CBC-SHA"
  813. # define TLS1_TXT_SRP_SHA_WITH_AES_256_CBC_SHA "SRP-AES-256-CBC-SHA"
  814. # define TLS1_TXT_SRP_SHA_RSA_WITH_AES_256_CBC_SHA "SRP-RSA-AES-256-CBC-SHA"
  815. # define TLS1_TXT_SRP_SHA_DSS_WITH_AES_256_CBC_SHA "SRP-DSS-AES-256-CBC-SHA"
  816. /* Camellia ciphersuites from RFC4132 */
  817. # define TLS1_TXT_RSA_WITH_CAMELLIA_128_CBC_SHA "CAMELLIA128-SHA"
  818. # define TLS1_TXT_DH_DSS_WITH_CAMELLIA_128_CBC_SHA "DH-DSS-CAMELLIA128-SHA"
  819. # define TLS1_TXT_DH_RSA_WITH_CAMELLIA_128_CBC_SHA "DH-RSA-CAMELLIA128-SHA"
  820. # define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA "DHE-DSS-CAMELLIA128-SHA"
  821. # define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA "DHE-RSA-CAMELLIA128-SHA"
  822. # define TLS1_TXT_ADH_WITH_CAMELLIA_128_CBC_SHA "ADH-CAMELLIA128-SHA"
  823. # define TLS1_TXT_RSA_WITH_CAMELLIA_256_CBC_SHA "CAMELLIA256-SHA"
  824. # define TLS1_TXT_DH_DSS_WITH_CAMELLIA_256_CBC_SHA "DH-DSS-CAMELLIA256-SHA"
  825. # define TLS1_TXT_DH_RSA_WITH_CAMELLIA_256_CBC_SHA "DH-RSA-CAMELLIA256-SHA"
  826. # define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA "DHE-DSS-CAMELLIA256-SHA"
  827. # define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA "DHE-RSA-CAMELLIA256-SHA"
  828. # define TLS1_TXT_ADH_WITH_CAMELLIA_256_CBC_SHA "ADH-CAMELLIA256-SHA"
  829. /* TLS 1.2 Camellia SHA-256 ciphersuites from RFC5932 */
  830. # define TLS1_TXT_RSA_WITH_CAMELLIA_128_CBC_SHA256 "CAMELLIA128-SHA256"
  831. # define TLS1_TXT_DH_DSS_WITH_CAMELLIA_128_CBC_SHA256 "DH-DSS-CAMELLIA128-SHA256"
  832. # define TLS1_TXT_DH_RSA_WITH_CAMELLIA_128_CBC_SHA256 "DH-RSA-CAMELLIA128-SHA256"
  833. # define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256 "DHE-DSS-CAMELLIA128-SHA256"
  834. # define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 "DHE-RSA-CAMELLIA128-SHA256"
  835. # define TLS1_TXT_ADH_WITH_CAMELLIA_128_CBC_SHA256 "ADH-CAMELLIA128-SHA256"
  836. # define TLS1_TXT_RSA_WITH_CAMELLIA_256_CBC_SHA256 "CAMELLIA256-SHA256"
  837. # define TLS1_TXT_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256 "DH-DSS-CAMELLIA256-SHA256"
  838. # define TLS1_TXT_DH_RSA_WITH_CAMELLIA_256_CBC_SHA256 "DH-RSA-CAMELLIA256-SHA256"
  839. # define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256 "DHE-DSS-CAMELLIA256-SHA256"
  840. # define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 "DHE-RSA-CAMELLIA256-SHA256"
  841. # define TLS1_TXT_ADH_WITH_CAMELLIA_256_CBC_SHA256 "ADH-CAMELLIA256-SHA256"
  842. # define TLS1_TXT_PSK_WITH_CAMELLIA_128_CBC_SHA256 "PSK-CAMELLIA128-SHA256"
  843. # define TLS1_TXT_PSK_WITH_CAMELLIA_256_CBC_SHA384 "PSK-CAMELLIA256-SHA384"
  844. # define TLS1_TXT_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 "DHE-PSK-CAMELLIA128-SHA256"
  845. # define TLS1_TXT_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 "DHE-PSK-CAMELLIA256-SHA384"
  846. # define TLS1_TXT_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256 "RSA-PSK-CAMELLIA128-SHA256"
  847. # define TLS1_TXT_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384 "RSA-PSK-CAMELLIA256-SHA384"
  848. # define TLS1_TXT_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 "ECDHE-PSK-CAMELLIA128-SHA256"
  849. # define TLS1_TXT_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 "ECDHE-PSK-CAMELLIA256-SHA384"
  850. /* SEED ciphersuites from RFC4162 */
  851. # define TLS1_TXT_RSA_WITH_SEED_SHA "SEED-SHA"
  852. # define TLS1_TXT_DH_DSS_WITH_SEED_SHA "DH-DSS-SEED-SHA"
  853. # define TLS1_TXT_DH_RSA_WITH_SEED_SHA "DH-RSA-SEED-SHA"
  854. # define TLS1_TXT_DHE_DSS_WITH_SEED_SHA "DHE-DSS-SEED-SHA"
  855. # define TLS1_TXT_DHE_RSA_WITH_SEED_SHA "DHE-RSA-SEED-SHA"
  856. # define TLS1_TXT_ADH_WITH_SEED_SHA "ADH-SEED-SHA"
  857. /* TLS v1.2 ciphersuites */
  858. # define TLS1_TXT_RSA_WITH_NULL_SHA256 "NULL-SHA256"
  859. # define TLS1_TXT_RSA_WITH_AES_128_SHA256 "AES128-SHA256"
  860. # define TLS1_TXT_RSA_WITH_AES_256_SHA256 "AES256-SHA256"
  861. # define TLS1_TXT_DH_DSS_WITH_AES_128_SHA256 "DH-DSS-AES128-SHA256"
  862. # define TLS1_TXT_DH_RSA_WITH_AES_128_SHA256 "DH-RSA-AES128-SHA256"
  863. # define TLS1_TXT_DHE_DSS_WITH_AES_128_SHA256 "DHE-DSS-AES128-SHA256"
  864. # define TLS1_TXT_DHE_RSA_WITH_AES_128_SHA256 "DHE-RSA-AES128-SHA256"
  865. # define TLS1_TXT_DH_DSS_WITH_AES_256_SHA256 "DH-DSS-AES256-SHA256"
  866. # define TLS1_TXT_DH_RSA_WITH_AES_256_SHA256 "DH-RSA-AES256-SHA256"
  867. # define TLS1_TXT_DHE_DSS_WITH_AES_256_SHA256 "DHE-DSS-AES256-SHA256"
  868. # define TLS1_TXT_DHE_RSA_WITH_AES_256_SHA256 "DHE-RSA-AES256-SHA256"
  869. # define TLS1_TXT_ADH_WITH_AES_128_SHA256 "ADH-AES128-SHA256"
  870. # define TLS1_TXT_ADH_WITH_AES_256_SHA256 "ADH-AES256-SHA256"
  871. /* TLS v1.2 GCM ciphersuites from RFC5288 */
  872. # define TLS1_TXT_RSA_WITH_AES_128_GCM_SHA256 "AES128-GCM-SHA256"
  873. # define TLS1_TXT_RSA_WITH_AES_256_GCM_SHA384 "AES256-GCM-SHA384"
  874. # define TLS1_TXT_DHE_RSA_WITH_AES_128_GCM_SHA256 "DHE-RSA-AES128-GCM-SHA256"
  875. # define TLS1_TXT_DHE_RSA_WITH_AES_256_GCM_SHA384 "DHE-RSA-AES256-GCM-SHA384"
  876. # define TLS1_TXT_DH_RSA_WITH_AES_128_GCM_SHA256 "DH-RSA-AES128-GCM-SHA256"
  877. # define TLS1_TXT_DH_RSA_WITH_AES_256_GCM_SHA384 "DH-RSA-AES256-GCM-SHA384"
  878. # define TLS1_TXT_DHE_DSS_WITH_AES_128_GCM_SHA256 "DHE-DSS-AES128-GCM-SHA256"
  879. # define TLS1_TXT_DHE_DSS_WITH_AES_256_GCM_SHA384 "DHE-DSS-AES256-GCM-SHA384"
  880. # define TLS1_TXT_DH_DSS_WITH_AES_128_GCM_SHA256 "DH-DSS-AES128-GCM-SHA256"
  881. # define TLS1_TXT_DH_DSS_WITH_AES_256_GCM_SHA384 "DH-DSS-AES256-GCM-SHA384"
  882. # define TLS1_TXT_ADH_WITH_AES_128_GCM_SHA256 "ADH-AES128-GCM-SHA256"
  883. # define TLS1_TXT_ADH_WITH_AES_256_GCM_SHA384 "ADH-AES256-GCM-SHA384"
  884. /* CCM ciphersuites from RFC6655 */
  885. # define TLS1_TXT_RSA_WITH_AES_128_CCM "AES128-CCM"
  886. # define TLS1_TXT_RSA_WITH_AES_256_CCM "AES256-CCM"
  887. # define TLS1_TXT_DHE_RSA_WITH_AES_128_CCM "DHE-RSA-AES128-CCM"
  888. # define TLS1_TXT_DHE_RSA_WITH_AES_256_CCM "DHE-RSA-AES256-CCM"
  889. # define TLS1_TXT_RSA_WITH_AES_128_CCM_8 "AES128-CCM8"
  890. # define TLS1_TXT_RSA_WITH_AES_256_CCM_8 "AES256-CCM8"
  891. # define TLS1_TXT_DHE_RSA_WITH_AES_128_CCM_8 "DHE-RSA-AES128-CCM8"
  892. # define TLS1_TXT_DHE_RSA_WITH_AES_256_CCM_8 "DHE-RSA-AES256-CCM8"
  893. # define TLS1_TXT_PSK_WITH_AES_128_CCM "PSK-AES128-CCM"
  894. # define TLS1_TXT_PSK_WITH_AES_256_CCM "PSK-AES256-CCM"
  895. # define TLS1_TXT_DHE_PSK_WITH_AES_128_CCM "DHE-PSK-AES128-CCM"
  896. # define TLS1_TXT_DHE_PSK_WITH_AES_256_CCM "DHE-PSK-AES256-CCM"
  897. # define TLS1_TXT_PSK_WITH_AES_128_CCM_8 "PSK-AES128-CCM8"
  898. # define TLS1_TXT_PSK_WITH_AES_256_CCM_8 "PSK-AES256-CCM8"
  899. # define TLS1_TXT_DHE_PSK_WITH_AES_128_CCM_8 "DHE-PSK-AES128-CCM8"
  900. # define TLS1_TXT_DHE_PSK_WITH_AES_256_CCM_8 "DHE-PSK-AES256-CCM8"
  901. /* CCM ciphersuites from RFC7251 */
  902. # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CCM "ECDHE-ECDSA-AES128-CCM"
  903. # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CCM "ECDHE-ECDSA-AES256-CCM"
  904. # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CCM_8 "ECDHE-ECDSA-AES128-CCM8"
  905. # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CCM_8 "ECDHE-ECDSA-AES256-CCM8"
  906. /* ECDH HMAC based ciphersuites from RFC5289 */
  907. # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_SHA256 "ECDHE-ECDSA-AES128-SHA256"
  908. # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_SHA384 "ECDHE-ECDSA-AES256-SHA384"
  909. # define TLS1_TXT_ECDH_ECDSA_WITH_AES_128_SHA256 "ECDH-ECDSA-AES128-SHA256"
  910. # define TLS1_TXT_ECDH_ECDSA_WITH_AES_256_SHA384 "ECDH-ECDSA-AES256-SHA384"
  911. # define TLS1_TXT_ECDHE_RSA_WITH_AES_128_SHA256 "ECDHE-RSA-AES128-SHA256"
  912. # define TLS1_TXT_ECDHE_RSA_WITH_AES_256_SHA384 "ECDHE-RSA-AES256-SHA384"
  913. # define TLS1_TXT_ECDH_RSA_WITH_AES_128_SHA256 "ECDH-RSA-AES128-SHA256"
  914. # define TLS1_TXT_ECDH_RSA_WITH_AES_256_SHA384 "ECDH-RSA-AES256-SHA384"
  915. /* ECDH GCM based ciphersuites from RFC5289 */
  916. # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 "ECDHE-ECDSA-AES128-GCM-SHA256"
  917. # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 "ECDHE-ECDSA-AES256-GCM-SHA384"
  918. # define TLS1_TXT_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 "ECDH-ECDSA-AES128-GCM-SHA256"
  919. # define TLS1_TXT_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 "ECDH-ECDSA-AES256-GCM-SHA384"
  920. # define TLS1_TXT_ECDHE_RSA_WITH_AES_128_GCM_SHA256 "ECDHE-RSA-AES128-GCM-SHA256"
  921. # define TLS1_TXT_ECDHE_RSA_WITH_AES_256_GCM_SHA384 "ECDHE-RSA-AES256-GCM-SHA384"
  922. # define TLS1_TXT_ECDH_RSA_WITH_AES_128_GCM_SHA256 "ECDH-RSA-AES128-GCM-SHA256"
  923. # define TLS1_TXT_ECDH_RSA_WITH_AES_256_GCM_SHA384 "ECDH-RSA-AES256-GCM-SHA384"
  924. /* TLS v1.2 PSK GCM ciphersuites from RFC5487 */
  925. # define TLS1_TXT_PSK_WITH_AES_128_GCM_SHA256 "PSK-AES128-GCM-SHA256"
  926. # define TLS1_TXT_PSK_WITH_AES_256_GCM_SHA384 "PSK-AES256-GCM-SHA384"
  927. /* ECDHE PSK ciphersuites from RFC 5489 */
  928. # define TLS1_TXT_ECDHE_PSK_WITH_RC4_128_SHA "ECDHE-PSK-RC4-SHA"
  929. # define TLS1_TXT_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA "ECDHE-PSK-3DES-EDE-CBC-SHA"
  930. # define TLS1_TXT_ECDHE_PSK_WITH_AES_128_CBC_SHA "ECDHE-PSK-AES128-CBC-SHA"
  931. # define TLS1_TXT_ECDHE_PSK_WITH_AES_256_CBC_SHA "ECDHE-PSK-AES256-CBC-SHA"
  932. # define TLS1_TXT_ECDHE_PSK_WITH_AES_128_CBC_SHA256 "ECDHE-PSK-AES128-CBC-SHA256"
  933. # define TLS1_TXT_ECDHE_PSK_WITH_AES_256_CBC_SHA384 "ECDHE-PSK-AES256-CBC-SHA384"
  934. # define TLS1_TXT_ECDHE_PSK_WITH_NULL_SHA "ECDHE-PSK-NULL-SHA"
  935. # define TLS1_TXT_ECDHE_PSK_WITH_NULL_SHA256 "ECDHE-PSK-NULL-SHA256"
  936. # define TLS1_TXT_ECDHE_PSK_WITH_NULL_SHA384 "ECDHE-PSK-NULL-SHA384"
  937. /* Camellia-CBC ciphersuites from RFC6367 */
  938. # define TLS1_TXT_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 "ECDHE-ECDSA-CAMELLIA128-SHA256"
  939. # define TLS1_TXT_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 "ECDHE-ECDSA-CAMELLIA256-SHA384"
  940. # define TLS1_TXT_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 "ECDH-ECDSA-CAMELLIA128-SHA256"
  941. # define TLS1_TXT_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 "ECDH-ECDSA-CAMELLIA256-SHA384"
  942. # define TLS1_TXT_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 "ECDHE-RSA-CAMELLIA128-SHA256"
  943. # define TLS1_TXT_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384 "ECDHE-RSA-CAMELLIA256-SHA384"
  944. # define TLS1_TXT_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256 "ECDH-RSA-CAMELLIA128-SHA256"
  945. # define TLS1_TXT_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384 "ECDH-RSA-CAMELLIA256-SHA384"
  946. /* draft-ietf-tls-chacha20-poly1305-03 */
  947. # define TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305 "ECDHE-RSA-CHACHA20-POLY1305"
  948. # define TLS1_TXT_ECDHE_ECDSA_WITH_CHACHA20_POLY1305 "ECDHE-ECDSA-CHACHA20-POLY1305"
  949. # define TLS1_TXT_DHE_RSA_WITH_CHACHA20_POLY1305 "DHE-RSA-CHACHA20-POLY1305"
  950. # define TLS1_TXT_PSK_WITH_CHACHA20_POLY1305 "PSK-CHACHA20-POLY1305"
  951. # define TLS1_TXT_ECDHE_PSK_WITH_CHACHA20_POLY1305 "ECDHE-PSK-CHACHA20-POLY1305"
  952. # define TLS1_TXT_DHE_PSK_WITH_CHACHA20_POLY1305 "DHE-PSK-CHACHA20-POLY1305"
  953. # define TLS1_TXT_RSA_PSK_WITH_CHACHA20_POLY1305 "RSA-PSK-CHACHA20-POLY1305"
  954. /* Aria ciphersuites from RFC6209 */
  955. # define TLS1_TXT_RSA_WITH_ARIA_128_GCM_SHA256 "ARIA128-GCM-SHA256"
  956. # define TLS1_TXT_RSA_WITH_ARIA_256_GCM_SHA384 "ARIA256-GCM-SHA384"
  957. # define TLS1_TXT_DHE_RSA_WITH_ARIA_128_GCM_SHA256 "DHE-RSA-ARIA128-GCM-SHA256"
  958. # define TLS1_TXT_DHE_RSA_WITH_ARIA_256_GCM_SHA384 "DHE-RSA-ARIA256-GCM-SHA384"
  959. # define TLS1_TXT_DH_RSA_WITH_ARIA_128_GCM_SHA256 "DH-RSA-ARIA128-GCM-SHA256"
  960. # define TLS1_TXT_DH_RSA_WITH_ARIA_256_GCM_SHA384 "DH-RSA-ARIA256-GCM-SHA384"
  961. # define TLS1_TXT_DHE_DSS_WITH_ARIA_128_GCM_SHA256 "DHE-DSS-ARIA128-GCM-SHA256"
  962. # define TLS1_TXT_DHE_DSS_WITH_ARIA_256_GCM_SHA384 "DHE-DSS-ARIA256-GCM-SHA384"
  963. # define TLS1_TXT_DH_DSS_WITH_ARIA_128_GCM_SHA256 "DH-DSS-ARIA128-GCM-SHA256"
  964. # define TLS1_TXT_DH_DSS_WITH_ARIA_256_GCM_SHA384 "DH-DSS-ARIA256-GCM-SHA384"
  965. # define TLS1_TXT_DH_anon_WITH_ARIA_128_GCM_SHA256 "ADH-ARIA128-GCM-SHA256"
  966. # define TLS1_TXT_DH_anon_WITH_ARIA_256_GCM_SHA384 "ADH-ARIA256-GCM-SHA384"
  967. # define TLS1_TXT_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256 "ECDHE-ECDSA-ARIA128-GCM-SHA256"
  968. # define TLS1_TXT_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384 "ECDHE-ECDSA-ARIA256-GCM-SHA384"
  969. # define TLS1_TXT_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256 "ECDH-ECDSA-ARIA128-GCM-SHA256"
  970. # define TLS1_TXT_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384 "ECDH-ECDSA-ARIA256-GCM-SHA384"
  971. # define TLS1_TXT_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256 "ECDHE-ARIA128-GCM-SHA256"
  972. # define TLS1_TXT_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384 "ECDHE-ARIA256-GCM-SHA384"
  973. # define TLS1_TXT_ECDH_RSA_WITH_ARIA_128_GCM_SHA256 "ECDH-ARIA128-GCM-SHA256"
  974. # define TLS1_TXT_ECDH_RSA_WITH_ARIA_256_GCM_SHA384 "ECDH-ARIA256-GCM-SHA384"
  975. # define TLS1_TXT_PSK_WITH_ARIA_128_GCM_SHA256 "PSK-ARIA128-GCM-SHA256"
  976. # define TLS1_TXT_PSK_WITH_ARIA_256_GCM_SHA384 "PSK-ARIA256-GCM-SHA384"
  977. # define TLS1_TXT_DHE_PSK_WITH_ARIA_128_GCM_SHA256 "DHE-PSK-ARIA128-GCM-SHA256"
  978. # define TLS1_TXT_DHE_PSK_WITH_ARIA_256_GCM_SHA384 "DHE-PSK-ARIA256-GCM-SHA384"
  979. # define TLS1_TXT_RSA_PSK_WITH_ARIA_128_GCM_SHA256 "RSA-PSK-ARIA128-GCM-SHA256"
  980. # define TLS1_TXT_RSA_PSK_WITH_ARIA_256_GCM_SHA384 "RSA-PSK-ARIA256-GCM-SHA384"
  981. /* TLSv1.3 ciphersuites */
  982. /*
  983. * TODO(TLS1.3): Review the naming scheme for TLSv1.3 ciphers and also the
  984. * cipherstring selection process for these ciphers
  985. */
  986. # define TLS1_3_TXT_AES_128_GCM_SHA256 "TLS13-AES-128-GCM-SHA256"
  987. # define TLS1_3_TXT_AES_256_GCM_SHA384 "TLS13-AES-256-GCM-SHA384"
  988. # define TLS1_3_TXT_CHACHA20_POLY1305_SHA256 "TLS13-CHACHA20-POLY1305-SHA256"
  989. # define TLS1_3_TXT_AES_128_CCM_SHA256 "TLS13-AES-128-CCM-SHA256"
  990. # define TLS1_3_TXT_AES_128_CCM_8_SHA256 "TLS13-AES-128-CCM-8-SHA256"
  991. # define TLS_CT_RSA_SIGN 1
  992. # define TLS_CT_DSS_SIGN 2
  993. # define TLS_CT_RSA_FIXED_DH 3
  994. # define TLS_CT_DSS_FIXED_DH 4
  995. # define TLS_CT_ECDSA_SIGN 64
  996. # define TLS_CT_RSA_FIXED_ECDH 65
  997. # define TLS_CT_ECDSA_FIXED_ECDH 66
  998. # define TLS_CT_GOST01_SIGN 22
  999. # define TLS_CT_GOST12_SIGN 238
  1000. # define TLS_CT_GOST12_512_SIGN 239
  1001. /*
  1002. * when correcting this number, correct also SSL3_CT_NUMBER in ssl3.h (see
  1003. * comment there)
  1004. */
  1005. # define TLS_CT_NUMBER 9
  1006. # define TLS1_FINISH_MAC_LENGTH 12
  1007. # define TLS_MD_MAX_CONST_SIZE 22
  1008. # define TLS_MD_CLIENT_FINISH_CONST "client finished"
  1009. # define TLS_MD_CLIENT_FINISH_CONST_SIZE 15
  1010. # define TLS_MD_SERVER_FINISH_CONST "server finished"
  1011. # define TLS_MD_SERVER_FINISH_CONST_SIZE 15
  1012. # define TLS_MD_KEY_EXPANSION_CONST "key expansion"
  1013. # define TLS_MD_KEY_EXPANSION_CONST_SIZE 13
  1014. # define TLS_MD_CLIENT_WRITE_KEY_CONST "client write key"
  1015. # define TLS_MD_CLIENT_WRITE_KEY_CONST_SIZE 16
  1016. # define TLS_MD_SERVER_WRITE_KEY_CONST "server write key"
  1017. # define TLS_MD_SERVER_WRITE_KEY_CONST_SIZE 16
  1018. # define TLS_MD_IV_BLOCK_CONST "IV block"
  1019. # define TLS_MD_IV_BLOCK_CONST_SIZE 8
  1020. # define TLS_MD_MASTER_SECRET_CONST "master secret"
  1021. # define TLS_MD_MASTER_SECRET_CONST_SIZE 13
  1022. # define TLS_MD_EXTENDED_MASTER_SECRET_CONST "extended master secret"
  1023. # define TLS_MD_EXTENDED_MASTER_SECRET_CONST_SIZE 22
  1024. # ifdef CHARSET_EBCDIC
  1025. # undef TLS_MD_CLIENT_FINISH_CONST
  1026. /*
  1027. * client finished
  1028. */
  1029. # define TLS_MD_CLIENT_FINISH_CONST "\x63\x6c\x69\x65\x6e\x74\x20\x66\x69\x6e\x69\x73\x68\x65\x64"
  1030. # undef TLS_MD_SERVER_FINISH_CONST
  1031. /*
  1032. * server finished
  1033. */
  1034. # define TLS_MD_SERVER_FINISH_CONST "\x73\x65\x72\x76\x65\x72\x20\x66\x69\x6e\x69\x73\x68\x65\x64"
  1035. # undef TLS_MD_SERVER_WRITE_KEY_CONST
  1036. /*
  1037. * server write key
  1038. */
  1039. # define TLS_MD_SERVER_WRITE_KEY_CONST "\x73\x65\x72\x76\x65\x72\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79"
  1040. # undef TLS_MD_KEY_EXPANSION_CONST
  1041. /*
  1042. * key expansion
  1043. */
  1044. # define TLS_MD_KEY_EXPANSION_CONST "\x6b\x65\x79\x20\x65\x78\x70\x61\x6e\x73\x69\x6f\x6e"
  1045. # undef TLS_MD_CLIENT_WRITE_KEY_CONST
  1046. /*
  1047. * client write key
  1048. */
  1049. # define TLS_MD_CLIENT_WRITE_KEY_CONST "\x63\x6c\x69\x65\x6e\x74\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79"
  1050. # undef TLS_MD_SERVER_WRITE_KEY_CONST
  1051. /*
  1052. * server write key
  1053. */
  1054. # define TLS_MD_SERVER_WRITE_KEY_CONST "\x73\x65\x72\x76\x65\x72\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79"
  1055. # undef TLS_MD_IV_BLOCK_CONST
  1056. /*
  1057. * IV block
  1058. */
  1059. # define TLS_MD_IV_BLOCK_CONST "\x49\x56\x20\x62\x6c\x6f\x63\x6b"
  1060. # undef TLS_MD_MASTER_SECRET_CONST
  1061. /*
  1062. * master secret
  1063. */
  1064. # define TLS_MD_MASTER_SECRET_CONST "\x6d\x61\x73\x74\x65\x72\x20\x73\x65\x63\x72\x65\x74"
  1065. # undef TLS_MD_EXTENDED_MASTER_SECRET_CONST
  1066. /*
  1067. * extended master secret
  1068. */
  1069. # define TLS_MD_EXTENDED_MASTER_SECRET_CONST "\x65\x78\x74\x65\x63\x64\x65\x64\x20\x6d\x61\x73\x74\x65\x72\x20\x73\x65\x63\x72\x65\x74"
  1070. # endif
  1071. /* TLS Session Ticket extension struct */
  1072. struct tls_session_ticket_ext_st {
  1073. unsigned short length;
  1074. void *data;
  1075. };
  1076. #ifdef __cplusplus
  1077. }
  1078. #endif
  1079. #endif