tls1.h 70 KB

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