tls1.h 48 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973
  1. /*
  2. * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
  3. *
  4. * Licensed under the OpenSSL license (the "License"). You may not use
  5. * this file except in compliance with the License. You can obtain a copy
  6. * in the file LICENSE in the source distribution or at
  7. * https://www.openssl.org/source/license.html
  8. */
  9. /* ====================================================================
  10. * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
  11. *
  12. * Portions of the attached software ("Contribution") are developed by
  13. * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
  14. *
  15. * The Contribution is licensed pursuant to the OpenSSL open source
  16. * license provided above.
  17. *
  18. * ECC cipher suite support in OpenSSL originally written by
  19. * Vipul Gupta and Sumit Gupta of Sun Microsystems Laboratories.
  20. *
  21. */
  22. /* ====================================================================
  23. * Copyright 2005 Nokia. All rights reserved.
  24. *
  25. * The portions of the attached software ("Contribution") is developed by
  26. * Nokia Corporation and is licensed pursuant to the OpenSSL open source
  27. * license.
  28. *
  29. * The Contribution, originally written by Mika Kousa and Pasi Eronen of
  30. * Nokia Corporation, consists of the "PSK" (Pre-Shared Key) ciphersuites
  31. * support (see RFC 4279) to OpenSSL.
  32. *
  33. * No patent licenses or other rights except those expressly stated in
  34. * the OpenSSL open source license shall be deemed granted or received
  35. * expressly, by implication, estoppel, or otherwise.
  36. *
  37. * No assurances are provided by Nokia that the Contribution does not
  38. * infringe the patent or other intellectual property rights of any third
  39. * party or that the license provides you with all the necessary rights
  40. * to make use of the Contribution.
  41. *
  42. * THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. IN
  43. * ADDITION TO THE DISCLAIMERS INCLUDED IN THE LICENSE, NOKIA
  44. * SPECIFICALLY DISCLAIMS ANY LIABILITY FOR CLAIMS BROUGHT BY YOU OR ANY
  45. * OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS OR
  46. * OTHERWISE.
  47. */
  48. #ifndef HEADER_TLS1_H
  49. # define HEADER_TLS1_H
  50. # include <openssl/buffer.h>
  51. # include <openssl/x509.h>
  52. #ifdef __cplusplus
  53. extern "C" {
  54. #endif
  55. /* Default security level if not overridden at config time */
  56. # ifndef OPENSSL_TLS_SECURITY_LEVEL
  57. # define OPENSSL_TLS_SECURITY_LEVEL 1
  58. # endif
  59. # define TLS1_VERSION 0x0301
  60. # define TLS1_1_VERSION 0x0302
  61. # define TLS1_2_VERSION 0x0303
  62. # define TLS_MAX_VERSION TLS1_2_VERSION
  63. /* Special value for method supporting multiple versions */
  64. # define TLS_ANY_VERSION 0x10000
  65. # define TLS1_VERSION_MAJOR 0x03
  66. # define TLS1_VERSION_MINOR 0x01
  67. # define TLS1_1_VERSION_MAJOR 0x03
  68. # define TLS1_1_VERSION_MINOR 0x02
  69. # define TLS1_2_VERSION_MAJOR 0x03
  70. # define TLS1_2_VERSION_MINOR 0x03
  71. # define TLS1_get_version(s) \
  72. ((SSL_version(s) >> 8) == TLS1_VERSION_MAJOR ? SSL_version(s) : 0)
  73. # define TLS1_get_client_version(s) \
  74. ((SSL_client_version(s) >> 8) == TLS1_VERSION_MAJOR ? SSL_client_version(s) : 0)
  75. # define TLS1_AD_DECRYPTION_FAILED 21
  76. # define TLS1_AD_RECORD_OVERFLOW 22
  77. # define TLS1_AD_UNKNOWN_CA 48/* fatal */
  78. # define TLS1_AD_ACCESS_DENIED 49/* fatal */
  79. # define TLS1_AD_DECODE_ERROR 50/* fatal */
  80. # define TLS1_AD_DECRYPT_ERROR 51
  81. # define TLS1_AD_EXPORT_RESTRICTION 60/* fatal */
  82. # define TLS1_AD_PROTOCOL_VERSION 70/* fatal */
  83. # define TLS1_AD_INSUFFICIENT_SECURITY 71/* fatal */
  84. # define TLS1_AD_INTERNAL_ERROR 80/* fatal */
  85. # define TLS1_AD_INAPPROPRIATE_FALLBACK 86/* fatal */
  86. # define TLS1_AD_USER_CANCELLED 90
  87. # define TLS1_AD_NO_RENEGOTIATION 100
  88. /* codes 110-114 are from RFC3546 */
  89. # define TLS1_AD_UNSUPPORTED_EXTENSION 110
  90. # define TLS1_AD_CERTIFICATE_UNOBTAINABLE 111
  91. # define TLS1_AD_UNRECOGNIZED_NAME 112
  92. # define TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE 113
  93. # define TLS1_AD_BAD_CERTIFICATE_HASH_VALUE 114
  94. # define TLS1_AD_UNKNOWN_PSK_IDENTITY 115/* fatal */
  95. # define TLS1_AD_NO_APPLICATION_PROTOCOL 120 /* fatal */
  96. /* ExtensionType values from RFC3546 / RFC4366 / RFC6066 */
  97. # define TLSEXT_TYPE_server_name 0
  98. # define TLSEXT_TYPE_max_fragment_length 1
  99. # define TLSEXT_TYPE_client_certificate_url 2
  100. # define TLSEXT_TYPE_trusted_ca_keys 3
  101. # define TLSEXT_TYPE_truncated_hmac 4
  102. # define TLSEXT_TYPE_status_request 5
  103. /* ExtensionType values from RFC4681 */
  104. # define TLSEXT_TYPE_user_mapping 6
  105. /* ExtensionType values from RFC5878 */
  106. # define TLSEXT_TYPE_client_authz 7
  107. # define TLSEXT_TYPE_server_authz 8
  108. /* ExtensionType values from RFC6091 */
  109. # define TLSEXT_TYPE_cert_type 9
  110. /* ExtensionType values from RFC4492 */
  111. # define TLSEXT_TYPE_elliptic_curves 10
  112. # define TLSEXT_TYPE_ec_point_formats 11
  113. /* ExtensionType value from RFC5054 */
  114. # define TLSEXT_TYPE_srp 12
  115. /* ExtensionType values from RFC5246 */
  116. # define TLSEXT_TYPE_signature_algorithms 13
  117. /* ExtensionType value from RFC5764 */
  118. # define TLSEXT_TYPE_use_srtp 14
  119. /* ExtensionType value from RFC5620 */
  120. # define TLSEXT_TYPE_heartbeat 15
  121. /* ExtensionType value from RFC7301 */
  122. # define TLSEXT_TYPE_application_layer_protocol_negotiation 16
  123. /*
  124. * Extension type for Certificate Transparency
  125. * https://tools.ietf.org/html/rfc6962#section-3.3.1
  126. */
  127. # define TLSEXT_TYPE_signed_certificate_timestamp 18
  128. /*
  129. * ExtensionType value for TLS padding extension.
  130. * http://tools.ietf.org/html/draft-agl-tls-padding
  131. */
  132. # define TLSEXT_TYPE_padding 21
  133. /* ExtensionType value from RFC7366 */
  134. # define TLSEXT_TYPE_encrypt_then_mac 22
  135. /* ExtensionType value from RFC7627 */
  136. # define TLSEXT_TYPE_extended_master_secret 23
  137. /* ExtensionType value from RFC4507 */
  138. # define TLSEXT_TYPE_session_ticket 35
  139. /* Temporary extension type */
  140. # define TLSEXT_TYPE_renegotiate 0xff01
  141. # ifndef OPENSSL_NO_NEXTPROTONEG
  142. /* This is not an IANA defined extension number */
  143. # define TLSEXT_TYPE_next_proto_neg 13172
  144. # endif
  145. /* NameType value from RFC3546 */
  146. # define TLSEXT_NAMETYPE_host_name 0
  147. /* status request value from RFC3546 */
  148. # define TLSEXT_STATUSTYPE_ocsp 1
  149. /* ECPointFormat values from RFC4492 */
  150. # define TLSEXT_ECPOINTFORMAT_first 0
  151. # define TLSEXT_ECPOINTFORMAT_uncompressed 0
  152. # define TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime 1
  153. # define TLSEXT_ECPOINTFORMAT_ansiX962_compressed_char2 2
  154. # define TLSEXT_ECPOINTFORMAT_last 2
  155. /* Signature and hash algorithms from RFC5246 */
  156. # define TLSEXT_signature_anonymous 0
  157. # define TLSEXT_signature_rsa 1
  158. # define TLSEXT_signature_dsa 2
  159. # define TLSEXT_signature_ecdsa 3
  160. # define TLSEXT_signature_gostr34102001 237
  161. # define TLSEXT_signature_gostr34102012_256 238
  162. # define TLSEXT_signature_gostr34102012_512 239
  163. /* Total number of different signature algorithms */
  164. # define TLSEXT_signature_num 7
  165. # define TLSEXT_hash_none 0
  166. # define TLSEXT_hash_md5 1
  167. # define TLSEXT_hash_sha1 2
  168. # define TLSEXT_hash_sha224 3
  169. # define TLSEXT_hash_sha256 4
  170. # define TLSEXT_hash_sha384 5
  171. # define TLSEXT_hash_sha512 6
  172. # define TLSEXT_hash_gostr3411 237
  173. # define TLSEXT_hash_gostr34112012_256 238
  174. # define TLSEXT_hash_gostr34112012_512 239
  175. /* Total number of different digest algorithms */
  176. # define TLSEXT_hash_num 10
  177. /* Flag set for unrecognised algorithms */
  178. # define TLSEXT_nid_unknown 0x1000000
  179. /* ECC curves */
  180. # define TLSEXT_curve_P_256 23
  181. # define TLSEXT_curve_P_384 24
  182. # define TLSEXT_MAXLEN_host_name 255
  183. __owur const char *SSL_get_servername(const SSL *s, const int type);
  184. __owur int SSL_get_servername_type(const SSL *s);
  185. /*
  186. * SSL_export_keying_material exports a value derived from the master secret,
  187. * as specified in RFC 5705. It writes |olen| bytes to |out| given a label and
  188. * optional context. (Since a zero length context is allowed, the |use_context|
  189. * flag controls whether a context is included.) It returns 1 on success and
  190. * zero otherwise.
  191. */
  192. __owur int SSL_export_keying_material(SSL *s, unsigned char *out, size_t olen,
  193. const char *label, size_t llen,
  194. const unsigned char *p, size_t plen,
  195. int use_context);
  196. int SSL_get_sigalgs(SSL *s, int idx,
  197. int *psign, int *phash, int *psignandhash,
  198. unsigned char *rsig, unsigned char *rhash);
  199. int SSL_get_shared_sigalgs(SSL *s, int idx,
  200. int *psign, int *phash, int *psignandhash,
  201. unsigned char *rsig, unsigned char *rhash);
  202. __owur int SSL_check_chain(SSL *s, X509 *x, EVP_PKEY *pk, STACK_OF(X509) *chain);
  203. # define SSL_set_tlsext_host_name(s,name) \
  204. SSL_ctrl(s,SSL_CTRL_SET_TLSEXT_HOSTNAME,TLSEXT_NAMETYPE_host_name,(char *)name)
  205. # define SSL_set_tlsext_debug_callback(ssl, cb) \
  206. SSL_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_DEBUG_CB,(void (*)(void))cb)
  207. # define SSL_set_tlsext_debug_arg(ssl, arg) \
  208. SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_DEBUG_ARG,0, (void *)arg)
  209. # define SSL_get_tlsext_status_type(ssl) \
  210. SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE,0, NULL)
  211. # define SSL_set_tlsext_status_type(ssl, type) \
  212. SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE,type, NULL)
  213. # define SSL_get_tlsext_status_exts(ssl, arg) \
  214. SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_EXTS,0, (void *)arg)
  215. # define SSL_set_tlsext_status_exts(ssl, arg) \
  216. SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_EXTS,0, (void *)arg)
  217. # define SSL_get_tlsext_status_ids(ssl, arg) \
  218. SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_IDS,0, (void *)arg)
  219. # define SSL_set_tlsext_status_ids(ssl, arg) \
  220. SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_IDS,0, (void *)arg)
  221. # define SSL_get_tlsext_status_ocsp_resp(ssl, arg) \
  222. SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP,0, (void *)arg)
  223. # define SSL_set_tlsext_status_ocsp_resp(ssl, arg, arglen) \
  224. SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP,arglen, (void *)arg)
  225. # define SSL_CTX_set_tlsext_servername_callback(ctx, cb) \
  226. SSL_CTX_callback_ctrl(ctx,SSL_CTRL_SET_TLSEXT_SERVERNAME_CB,(void (*)(void))cb)
  227. # define SSL_TLSEXT_ERR_OK 0
  228. # define SSL_TLSEXT_ERR_ALERT_WARNING 1
  229. # define SSL_TLSEXT_ERR_ALERT_FATAL 2
  230. # define SSL_TLSEXT_ERR_NOACK 3
  231. # define SSL_CTX_set_tlsext_servername_arg(ctx, arg) \
  232. SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG,0, (void *)arg)
  233. # define SSL_CTX_get_tlsext_ticket_keys(ctx, keys, keylen) \
  234. SSL_CTX_ctrl((ctx),SSL_CTRL_GET_TLSEXT_TICKET_KEYS,(keylen),(keys))
  235. # define SSL_CTX_set_tlsext_ticket_keys(ctx, keys, keylen) \
  236. SSL_CTX_ctrl((ctx),SSL_CTRL_SET_TLSEXT_TICKET_KEYS,(keylen),(keys))
  237. # define SSL_CTX_get_tlsext_status_cb(ssl, cb) \
  238. SSL_CTX_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB,0, (void (**)(void))cb)
  239. # define SSL_CTX_set_tlsext_status_cb(ssl, cb) \
  240. SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB,(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, (void *)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, (void *)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,(void (*)(void))cb)
  251. # ifndef OPENSSL_NO_HEARTBEATS
  252. # define SSL_DTLSEXT_HB_ENABLED 0x01
  253. # define SSL_DTLSEXT_HB_DONT_SEND_REQUESTS 0x02
  254. # define SSL_DTLSEXT_HB_DONT_RECV_REQUESTS 0x04
  255. # define SSL_get_dtlsext_heartbeat_pending(ssl) \
  256. SSL_ctrl((ssl),SSL_CTRL_GET_DTLS_EXT_HEARTBEAT_PENDING,0,NULL)
  257. # define SSL_set_dtlsext_heartbeat_no_requests(ssl, arg) \
  258. SSL_ctrl((ssl),SSL_CTRL_SET_DTLS_EXT_HEARTBEAT_NO_REQUESTS,arg,NULL)
  259. # if OPENSSL_API_COMPAT < 0x10100000L
  260. # define SSL_CTRL_TLS_EXT_SEND_HEARTBEAT \
  261. SSL_CTRL_DTLS_EXT_SEND_HEARTBEAT
  262. # define SSL_CTRL_GET_TLS_EXT_HEARTBEAT_PENDING \
  263. SSL_CTRL_GET_DTLS_EXT_HEARTBEAT_PENDING
  264. # define SSL_CTRL_SET_TLS_EXT_HEARTBEAT_NO_REQUESTS \
  265. SSL_CTRL_SET_DTLS_EXT_HEARTBEAT_NO_REQUESTS
  266. # define SSL_TLSEXT_HB_ENABLED \
  267. SSL_DTLSEXT_HB_ENABLED
  268. # define SSL_TLSEXT_HB_DONT_SEND_REQUESTS \
  269. SSL_DTLSEXT_HB_DONT_SEND_REQUESTS
  270. # define SSL_TLSEXT_HB_DONT_RECV_REQUESTS \
  271. SSL_DTLSEXT_HB_DONT_RECV_REQUESTS
  272. # define SSL_get_tlsext_heartbeat_pending(ssl) \
  273. SSL_get_dtlsext_heartbeat_pending(ssl)
  274. # define SSL_set_tlsext_heartbeat_no_requests(ssl, arg) \
  275. SSL_set_dtlsext_heartbeat_no_requests(ssl, arg)
  276. # endif
  277. # endif
  278. /* PSK ciphersuites from 4279 */
  279. # define TLS1_CK_PSK_WITH_RC4_128_SHA 0x0300008A
  280. # define TLS1_CK_PSK_WITH_3DES_EDE_CBC_SHA 0x0300008B
  281. # define TLS1_CK_PSK_WITH_AES_128_CBC_SHA 0x0300008C
  282. # define TLS1_CK_PSK_WITH_AES_256_CBC_SHA 0x0300008D
  283. # define TLS1_CK_DHE_PSK_WITH_RC4_128_SHA 0x0300008E
  284. # define TLS1_CK_DHE_PSK_WITH_3DES_EDE_CBC_SHA 0x0300008F
  285. # define TLS1_CK_DHE_PSK_WITH_AES_128_CBC_SHA 0x03000090
  286. # define TLS1_CK_DHE_PSK_WITH_AES_256_CBC_SHA 0x03000091
  287. # define TLS1_CK_RSA_PSK_WITH_RC4_128_SHA 0x03000092
  288. # define TLS1_CK_RSA_PSK_WITH_3DES_EDE_CBC_SHA 0x03000093
  289. # define TLS1_CK_RSA_PSK_WITH_AES_128_CBC_SHA 0x03000094
  290. # define TLS1_CK_RSA_PSK_WITH_AES_256_CBC_SHA 0x03000095
  291. /* PSK ciphersuites from 5487 */
  292. # define TLS1_CK_PSK_WITH_AES_128_GCM_SHA256 0x030000A8
  293. # define TLS1_CK_PSK_WITH_AES_256_GCM_SHA384 0x030000A9
  294. # define TLS1_CK_DHE_PSK_WITH_AES_128_GCM_SHA256 0x030000AA
  295. # define TLS1_CK_DHE_PSK_WITH_AES_256_GCM_SHA384 0x030000AB
  296. # define TLS1_CK_RSA_PSK_WITH_AES_128_GCM_SHA256 0x030000AC
  297. # define TLS1_CK_RSA_PSK_WITH_AES_256_GCM_SHA384 0x030000AD
  298. # define TLS1_CK_PSK_WITH_AES_128_CBC_SHA256 0x030000AE
  299. # define TLS1_CK_PSK_WITH_AES_256_CBC_SHA384 0x030000AF
  300. # define TLS1_CK_PSK_WITH_NULL_SHA256 0x030000B0
  301. # define TLS1_CK_PSK_WITH_NULL_SHA384 0x030000B1
  302. # define TLS1_CK_DHE_PSK_WITH_AES_128_CBC_SHA256 0x030000B2
  303. # define TLS1_CK_DHE_PSK_WITH_AES_256_CBC_SHA384 0x030000B3
  304. # define TLS1_CK_DHE_PSK_WITH_NULL_SHA256 0x030000B4
  305. # define TLS1_CK_DHE_PSK_WITH_NULL_SHA384 0x030000B5
  306. # define TLS1_CK_RSA_PSK_WITH_AES_128_CBC_SHA256 0x030000B6
  307. # define TLS1_CK_RSA_PSK_WITH_AES_256_CBC_SHA384 0x030000B7
  308. # define TLS1_CK_RSA_PSK_WITH_NULL_SHA256 0x030000B8
  309. # define TLS1_CK_RSA_PSK_WITH_NULL_SHA384 0x030000B9
  310. /* NULL PSK ciphersuites from RFC4785 */
  311. # define TLS1_CK_PSK_WITH_NULL_SHA 0x0300002C
  312. # define TLS1_CK_DHE_PSK_WITH_NULL_SHA 0x0300002D
  313. # define TLS1_CK_RSA_PSK_WITH_NULL_SHA 0x0300002E
  314. /* AES ciphersuites from RFC3268 */
  315. # define TLS1_CK_RSA_WITH_AES_128_SHA 0x0300002F
  316. # define TLS1_CK_DH_DSS_WITH_AES_128_SHA 0x03000030
  317. # define TLS1_CK_DH_RSA_WITH_AES_128_SHA 0x03000031
  318. # define TLS1_CK_DHE_DSS_WITH_AES_128_SHA 0x03000032
  319. # define TLS1_CK_DHE_RSA_WITH_AES_128_SHA 0x03000033
  320. # define TLS1_CK_ADH_WITH_AES_128_SHA 0x03000034
  321. # define TLS1_CK_RSA_WITH_AES_256_SHA 0x03000035
  322. # define TLS1_CK_DH_DSS_WITH_AES_256_SHA 0x03000036
  323. # define TLS1_CK_DH_RSA_WITH_AES_256_SHA 0x03000037
  324. # define TLS1_CK_DHE_DSS_WITH_AES_256_SHA 0x03000038
  325. # define TLS1_CK_DHE_RSA_WITH_AES_256_SHA 0x03000039
  326. # define TLS1_CK_ADH_WITH_AES_256_SHA 0x0300003A
  327. /* TLS v1.2 ciphersuites */
  328. # define TLS1_CK_RSA_WITH_NULL_SHA256 0x0300003B
  329. # define TLS1_CK_RSA_WITH_AES_128_SHA256 0x0300003C
  330. # define TLS1_CK_RSA_WITH_AES_256_SHA256 0x0300003D
  331. # define TLS1_CK_DH_DSS_WITH_AES_128_SHA256 0x0300003E
  332. # define TLS1_CK_DH_RSA_WITH_AES_128_SHA256 0x0300003F
  333. # define TLS1_CK_DHE_DSS_WITH_AES_128_SHA256 0x03000040
  334. /* Camellia ciphersuites from RFC4132 */
  335. # define TLS1_CK_RSA_WITH_CAMELLIA_128_CBC_SHA 0x03000041
  336. # define TLS1_CK_DH_DSS_WITH_CAMELLIA_128_CBC_SHA 0x03000042
  337. # define TLS1_CK_DH_RSA_WITH_CAMELLIA_128_CBC_SHA 0x03000043
  338. # define TLS1_CK_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA 0x03000044
  339. # define TLS1_CK_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA 0x03000045
  340. # define TLS1_CK_ADH_WITH_CAMELLIA_128_CBC_SHA 0x03000046
  341. /* TLS v1.2 ciphersuites */
  342. # define TLS1_CK_DHE_RSA_WITH_AES_128_SHA256 0x03000067
  343. # define TLS1_CK_DH_DSS_WITH_AES_256_SHA256 0x03000068
  344. # define TLS1_CK_DH_RSA_WITH_AES_256_SHA256 0x03000069
  345. # define TLS1_CK_DHE_DSS_WITH_AES_256_SHA256 0x0300006A
  346. # define TLS1_CK_DHE_RSA_WITH_AES_256_SHA256 0x0300006B
  347. # define TLS1_CK_ADH_WITH_AES_128_SHA256 0x0300006C
  348. # define TLS1_CK_ADH_WITH_AES_256_SHA256 0x0300006D
  349. /* Camellia ciphersuites from RFC4132 */
  350. # define TLS1_CK_RSA_WITH_CAMELLIA_256_CBC_SHA 0x03000084
  351. # define TLS1_CK_DH_DSS_WITH_CAMELLIA_256_CBC_SHA 0x03000085
  352. # define TLS1_CK_DH_RSA_WITH_CAMELLIA_256_CBC_SHA 0x03000086
  353. # define TLS1_CK_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA 0x03000087
  354. # define TLS1_CK_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA 0x03000088
  355. # define TLS1_CK_ADH_WITH_CAMELLIA_256_CBC_SHA 0x03000089
  356. /* SEED ciphersuites from RFC4162 */
  357. # define TLS1_CK_RSA_WITH_SEED_SHA 0x03000096
  358. # define TLS1_CK_DH_DSS_WITH_SEED_SHA 0x03000097
  359. # define TLS1_CK_DH_RSA_WITH_SEED_SHA 0x03000098
  360. # define TLS1_CK_DHE_DSS_WITH_SEED_SHA 0x03000099
  361. # define TLS1_CK_DHE_RSA_WITH_SEED_SHA 0x0300009A
  362. # define TLS1_CK_ADH_WITH_SEED_SHA 0x0300009B
  363. /* TLS v1.2 GCM ciphersuites from RFC5288 */
  364. # define TLS1_CK_RSA_WITH_AES_128_GCM_SHA256 0x0300009C
  365. # define TLS1_CK_RSA_WITH_AES_256_GCM_SHA384 0x0300009D
  366. # define TLS1_CK_DHE_RSA_WITH_AES_128_GCM_SHA256 0x0300009E
  367. # define TLS1_CK_DHE_RSA_WITH_AES_256_GCM_SHA384 0x0300009F
  368. # define TLS1_CK_DH_RSA_WITH_AES_128_GCM_SHA256 0x030000A0
  369. # define TLS1_CK_DH_RSA_WITH_AES_256_GCM_SHA384 0x030000A1
  370. # define TLS1_CK_DHE_DSS_WITH_AES_128_GCM_SHA256 0x030000A2
  371. # define TLS1_CK_DHE_DSS_WITH_AES_256_GCM_SHA384 0x030000A3
  372. # define TLS1_CK_DH_DSS_WITH_AES_128_GCM_SHA256 0x030000A4
  373. # define TLS1_CK_DH_DSS_WITH_AES_256_GCM_SHA384 0x030000A5
  374. # define TLS1_CK_ADH_WITH_AES_128_GCM_SHA256 0x030000A6
  375. # define TLS1_CK_ADH_WITH_AES_256_GCM_SHA384 0x030000A7
  376. /* CCM ciphersuites from RFC6655 */
  377. # define TLS1_CK_RSA_WITH_AES_128_CCM 0x0300C09C
  378. # define TLS1_CK_RSA_WITH_AES_256_CCM 0x0300C09D
  379. # define TLS1_CK_DHE_RSA_WITH_AES_128_CCM 0x0300C09E
  380. # define TLS1_CK_DHE_RSA_WITH_AES_256_CCM 0x0300C09F
  381. # define TLS1_CK_RSA_WITH_AES_128_CCM_8 0x0300C0A0
  382. # define TLS1_CK_RSA_WITH_AES_256_CCM_8 0x0300C0A1
  383. # define TLS1_CK_DHE_RSA_WITH_AES_128_CCM_8 0x0300C0A2
  384. # define TLS1_CK_DHE_RSA_WITH_AES_256_CCM_8 0x0300C0A3
  385. # define TLS1_CK_PSK_WITH_AES_128_CCM 0x0300C0A4
  386. # define TLS1_CK_PSK_WITH_AES_256_CCM 0x0300C0A5
  387. # define TLS1_CK_DHE_PSK_WITH_AES_128_CCM 0x0300C0A6
  388. # define TLS1_CK_DHE_PSK_WITH_AES_256_CCM 0x0300C0A7
  389. # define TLS1_CK_PSK_WITH_AES_128_CCM_8 0x0300C0A8
  390. # define TLS1_CK_PSK_WITH_AES_256_CCM_8 0x0300C0A9
  391. # define TLS1_CK_DHE_PSK_WITH_AES_128_CCM_8 0x0300C0AA
  392. # define TLS1_CK_DHE_PSK_WITH_AES_256_CCM_8 0x0300C0AB
  393. /* CCM ciphersuites from RFC7251 */
  394. # define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CCM 0x0300C0AC
  395. # define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CCM 0x0300C0AD
  396. # define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CCM_8 0x0300C0AE
  397. # define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CCM_8 0x0300C0AF
  398. /* TLS 1.2 Camellia SHA-256 ciphersuites from RFC5932 */
  399. # define TLS1_CK_RSA_WITH_CAMELLIA_128_CBC_SHA256 0x030000BA
  400. # define TLS1_CK_DH_DSS_WITH_CAMELLIA_128_CBC_SHA256 0x030000BB
  401. # define TLS1_CK_DH_RSA_WITH_CAMELLIA_128_CBC_SHA256 0x030000BC
  402. # define TLS1_CK_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256 0x030000BD
  403. # define TLS1_CK_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 0x030000BE
  404. # define TLS1_CK_ADH_WITH_CAMELLIA_128_CBC_SHA256 0x030000BF
  405. # define TLS1_CK_RSA_WITH_CAMELLIA_256_CBC_SHA256 0x030000C0
  406. # define TLS1_CK_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256 0x030000C1
  407. # define TLS1_CK_DH_RSA_WITH_CAMELLIA_256_CBC_SHA256 0x030000C2
  408. # define TLS1_CK_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256 0x030000C3
  409. # define TLS1_CK_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 0x030000C4
  410. # define TLS1_CK_ADH_WITH_CAMELLIA_256_CBC_SHA256 0x030000C5
  411. /* ECC ciphersuites from RFC4492 */
  412. # define TLS1_CK_ECDH_ECDSA_WITH_NULL_SHA 0x0300C001
  413. # define TLS1_CK_ECDH_ECDSA_WITH_RC4_128_SHA 0x0300C002
  414. # define TLS1_CK_ECDH_ECDSA_WITH_DES_192_CBC3_SHA 0x0300C003
  415. # define TLS1_CK_ECDH_ECDSA_WITH_AES_128_CBC_SHA 0x0300C004
  416. # define TLS1_CK_ECDH_ECDSA_WITH_AES_256_CBC_SHA 0x0300C005
  417. # define TLS1_CK_ECDHE_ECDSA_WITH_NULL_SHA 0x0300C006
  418. # define TLS1_CK_ECDHE_ECDSA_WITH_RC4_128_SHA 0x0300C007
  419. # define TLS1_CK_ECDHE_ECDSA_WITH_DES_192_CBC3_SHA 0x0300C008
  420. # define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA 0x0300C009
  421. # define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CBC_SHA 0x0300C00A
  422. # define TLS1_CK_ECDH_RSA_WITH_NULL_SHA 0x0300C00B
  423. # define TLS1_CK_ECDH_RSA_WITH_RC4_128_SHA 0x0300C00C
  424. # define TLS1_CK_ECDH_RSA_WITH_DES_192_CBC3_SHA 0x0300C00D
  425. # define TLS1_CK_ECDH_RSA_WITH_AES_128_CBC_SHA 0x0300C00E
  426. # define TLS1_CK_ECDH_RSA_WITH_AES_256_CBC_SHA 0x0300C00F
  427. # define TLS1_CK_ECDHE_RSA_WITH_NULL_SHA 0x0300C010
  428. # define TLS1_CK_ECDHE_RSA_WITH_RC4_128_SHA 0x0300C011
  429. # define TLS1_CK_ECDHE_RSA_WITH_DES_192_CBC3_SHA 0x0300C012
  430. # define TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA 0x0300C013
  431. # define TLS1_CK_ECDHE_RSA_WITH_AES_256_CBC_SHA 0x0300C014
  432. # define TLS1_CK_ECDH_anon_WITH_NULL_SHA 0x0300C015
  433. # define TLS1_CK_ECDH_anon_WITH_RC4_128_SHA 0x0300C016
  434. # define TLS1_CK_ECDH_anon_WITH_DES_192_CBC3_SHA 0x0300C017
  435. # define TLS1_CK_ECDH_anon_WITH_AES_128_CBC_SHA 0x0300C018
  436. # define TLS1_CK_ECDH_anon_WITH_AES_256_CBC_SHA 0x0300C019
  437. /* SRP ciphersuites from RFC 5054 */
  438. # define TLS1_CK_SRP_SHA_WITH_3DES_EDE_CBC_SHA 0x0300C01A
  439. # define TLS1_CK_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA 0x0300C01B
  440. # define TLS1_CK_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA 0x0300C01C
  441. # define TLS1_CK_SRP_SHA_WITH_AES_128_CBC_SHA 0x0300C01D
  442. # define TLS1_CK_SRP_SHA_RSA_WITH_AES_128_CBC_SHA 0x0300C01E
  443. # define TLS1_CK_SRP_SHA_DSS_WITH_AES_128_CBC_SHA 0x0300C01F
  444. # define TLS1_CK_SRP_SHA_WITH_AES_256_CBC_SHA 0x0300C020
  445. # define TLS1_CK_SRP_SHA_RSA_WITH_AES_256_CBC_SHA 0x0300C021
  446. # define TLS1_CK_SRP_SHA_DSS_WITH_AES_256_CBC_SHA 0x0300C022
  447. /* ECDH HMAC based ciphersuites from RFC5289 */
  448. # define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_SHA256 0x0300C023
  449. # define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_SHA384 0x0300C024
  450. # define TLS1_CK_ECDH_ECDSA_WITH_AES_128_SHA256 0x0300C025
  451. # define TLS1_CK_ECDH_ECDSA_WITH_AES_256_SHA384 0x0300C026
  452. # define TLS1_CK_ECDHE_RSA_WITH_AES_128_SHA256 0x0300C027
  453. # define TLS1_CK_ECDHE_RSA_WITH_AES_256_SHA384 0x0300C028
  454. # define TLS1_CK_ECDH_RSA_WITH_AES_128_SHA256 0x0300C029
  455. # define TLS1_CK_ECDH_RSA_WITH_AES_256_SHA384 0x0300C02A
  456. /* ECDH GCM based ciphersuites from RFC5289 */
  457. # define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 0x0300C02B
  458. # define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 0x0300C02C
  459. # define TLS1_CK_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 0x0300C02D
  460. # define TLS1_CK_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 0x0300C02E
  461. # define TLS1_CK_ECDHE_RSA_WITH_AES_128_GCM_SHA256 0x0300C02F
  462. # define TLS1_CK_ECDHE_RSA_WITH_AES_256_GCM_SHA384 0x0300C030
  463. # define TLS1_CK_ECDH_RSA_WITH_AES_128_GCM_SHA256 0x0300C031
  464. # define TLS1_CK_ECDH_RSA_WITH_AES_256_GCM_SHA384 0x0300C032
  465. /* ECDHE PSK ciphersuites from RFC5489 */
  466. # define TLS1_CK_ECDHE_PSK_WITH_RC4_128_SHA 0x0300C033
  467. # define TLS1_CK_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA 0x0300C034
  468. # define TLS1_CK_ECDHE_PSK_WITH_AES_128_CBC_SHA 0x0300C035
  469. # define TLS1_CK_ECDHE_PSK_WITH_AES_256_CBC_SHA 0x0300C036
  470. # define TLS1_CK_ECDHE_PSK_WITH_AES_128_CBC_SHA256 0x0300C037
  471. # define TLS1_CK_ECDHE_PSK_WITH_AES_256_CBC_SHA384 0x0300C038
  472. /* NULL PSK ciphersuites from RFC4785 */
  473. # define TLS1_CK_ECDHE_PSK_WITH_NULL_SHA 0x0300C039
  474. # define TLS1_CK_ECDHE_PSK_WITH_NULL_SHA256 0x0300C03A
  475. # define TLS1_CK_ECDHE_PSK_WITH_NULL_SHA384 0x0300C03B
  476. /* Camellia-CBC ciphersuites from RFC6367 */
  477. # define TLS1_CK_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 0x0300C072
  478. # define TLS1_CK_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 0x0300C073
  479. # define TLS1_CK_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 0x0300C074
  480. # define TLS1_CK_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 0x0300C075
  481. # define TLS1_CK_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 0x0300C076
  482. # define TLS1_CK_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384 0x0300C077
  483. # define TLS1_CK_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256 0x0300C078
  484. # define TLS1_CK_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384 0x0300C079
  485. # define TLS1_CK_PSK_WITH_CAMELLIA_128_CBC_SHA256 0x0300C094
  486. # define TLS1_CK_PSK_WITH_CAMELLIA_256_CBC_SHA384 0x0300C095
  487. # define TLS1_CK_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 0x0300C096
  488. # define TLS1_CK_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 0x0300C097
  489. # define TLS1_CK_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256 0x0300C098
  490. # define TLS1_CK_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384 0x0300C099
  491. # define TLS1_CK_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 0x0300C09A
  492. # define TLS1_CK_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 0x0300C09B
  493. /* draft-ietf-tls-chacha20-poly1305-03 */
  494. # define TLS1_CK_ECDHE_RSA_WITH_CHACHA20_POLY1305 0x0300CCA8
  495. # define TLS1_CK_ECDHE_ECDSA_WITH_CHACHA20_POLY1305 0x0300CCA9
  496. # define TLS1_CK_DHE_RSA_WITH_CHACHA20_POLY1305 0x0300CCAA
  497. # define TLS1_CK_PSK_WITH_CHACHA20_POLY1305 0x0300CCAB
  498. # define TLS1_CK_ECDHE_PSK_WITH_CHACHA20_POLY1305 0x0300CCAC
  499. # define TLS1_CK_DHE_PSK_WITH_CHACHA20_POLY1305 0x0300CCAD
  500. # define TLS1_CK_RSA_PSK_WITH_CHACHA20_POLY1305 0x0300CCAE
  501. /*
  502. * XXX Backward compatibility alert: Older versions of OpenSSL gave some DHE
  503. * ciphers names with "EDH" instead of "DHE". Going forward, we should be
  504. * using DHE everywhere, though we may indefinitely maintain aliases for
  505. * users or configurations that used "EDH"
  506. */
  507. # define TLS1_TXT_DHE_DSS_WITH_RC4_128_SHA "DHE-DSS-RC4-SHA"
  508. # define TLS1_TXT_PSK_WITH_NULL_SHA "PSK-NULL-SHA"
  509. # define TLS1_TXT_DHE_PSK_WITH_NULL_SHA "DHE-PSK-NULL-SHA"
  510. # define TLS1_TXT_RSA_PSK_WITH_NULL_SHA "RSA-PSK-NULL-SHA"
  511. /* AES ciphersuites from RFC3268 */
  512. # define TLS1_TXT_RSA_WITH_AES_128_SHA "AES128-SHA"
  513. # define TLS1_TXT_DH_DSS_WITH_AES_128_SHA "DH-DSS-AES128-SHA"
  514. # define TLS1_TXT_DH_RSA_WITH_AES_128_SHA "DH-RSA-AES128-SHA"
  515. # define TLS1_TXT_DHE_DSS_WITH_AES_128_SHA "DHE-DSS-AES128-SHA"
  516. # define TLS1_TXT_DHE_RSA_WITH_AES_128_SHA "DHE-RSA-AES128-SHA"
  517. # define TLS1_TXT_ADH_WITH_AES_128_SHA "ADH-AES128-SHA"
  518. # define TLS1_TXT_RSA_WITH_AES_256_SHA "AES256-SHA"
  519. # define TLS1_TXT_DH_DSS_WITH_AES_256_SHA "DH-DSS-AES256-SHA"
  520. # define TLS1_TXT_DH_RSA_WITH_AES_256_SHA "DH-RSA-AES256-SHA"
  521. # define TLS1_TXT_DHE_DSS_WITH_AES_256_SHA "DHE-DSS-AES256-SHA"
  522. # define TLS1_TXT_DHE_RSA_WITH_AES_256_SHA "DHE-RSA-AES256-SHA"
  523. # define TLS1_TXT_ADH_WITH_AES_256_SHA "ADH-AES256-SHA"
  524. /* ECC ciphersuites from RFC4492 */
  525. # define TLS1_TXT_ECDH_ECDSA_WITH_NULL_SHA "ECDH-ECDSA-NULL-SHA"
  526. # define TLS1_TXT_ECDH_ECDSA_WITH_RC4_128_SHA "ECDH-ECDSA-RC4-SHA"
  527. # define TLS1_TXT_ECDH_ECDSA_WITH_DES_192_CBC3_SHA "ECDH-ECDSA-DES-CBC3-SHA"
  528. # define TLS1_TXT_ECDH_ECDSA_WITH_AES_128_CBC_SHA "ECDH-ECDSA-AES128-SHA"
  529. # define TLS1_TXT_ECDH_ECDSA_WITH_AES_256_CBC_SHA "ECDH-ECDSA-AES256-SHA"
  530. # define TLS1_TXT_ECDHE_ECDSA_WITH_NULL_SHA "ECDHE-ECDSA-NULL-SHA"
  531. # define TLS1_TXT_ECDHE_ECDSA_WITH_RC4_128_SHA "ECDHE-ECDSA-RC4-SHA"
  532. # define TLS1_TXT_ECDHE_ECDSA_WITH_DES_192_CBC3_SHA "ECDHE-ECDSA-DES-CBC3-SHA"
  533. # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA "ECDHE-ECDSA-AES128-SHA"
  534. # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CBC_SHA "ECDHE-ECDSA-AES256-SHA"
  535. # define TLS1_TXT_ECDH_RSA_WITH_NULL_SHA "ECDH-RSA-NULL-SHA"
  536. # define TLS1_TXT_ECDH_RSA_WITH_RC4_128_SHA "ECDH-RSA-RC4-SHA"
  537. # define TLS1_TXT_ECDH_RSA_WITH_DES_192_CBC3_SHA "ECDH-RSA-DES-CBC3-SHA"
  538. # define TLS1_TXT_ECDH_RSA_WITH_AES_128_CBC_SHA "ECDH-RSA-AES128-SHA"
  539. # define TLS1_TXT_ECDH_RSA_WITH_AES_256_CBC_SHA "ECDH-RSA-AES256-SHA"
  540. # define TLS1_TXT_ECDHE_RSA_WITH_NULL_SHA "ECDHE-RSA-NULL-SHA"
  541. # define TLS1_TXT_ECDHE_RSA_WITH_RC4_128_SHA "ECDHE-RSA-RC4-SHA"
  542. # define TLS1_TXT_ECDHE_RSA_WITH_DES_192_CBC3_SHA "ECDHE-RSA-DES-CBC3-SHA"
  543. # define TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA "ECDHE-RSA-AES128-SHA"
  544. # define TLS1_TXT_ECDHE_RSA_WITH_AES_256_CBC_SHA "ECDHE-RSA-AES256-SHA"
  545. # define TLS1_TXT_ECDH_anon_WITH_NULL_SHA "AECDH-NULL-SHA"
  546. # define TLS1_TXT_ECDH_anon_WITH_RC4_128_SHA "AECDH-RC4-SHA"
  547. # define TLS1_TXT_ECDH_anon_WITH_DES_192_CBC3_SHA "AECDH-DES-CBC3-SHA"
  548. # define TLS1_TXT_ECDH_anon_WITH_AES_128_CBC_SHA "AECDH-AES128-SHA"
  549. # define TLS1_TXT_ECDH_anon_WITH_AES_256_CBC_SHA "AECDH-AES256-SHA"
  550. /* PSK ciphersuites from RFC 4279 */
  551. # define TLS1_TXT_PSK_WITH_RC4_128_SHA "PSK-RC4-SHA"
  552. # define TLS1_TXT_PSK_WITH_3DES_EDE_CBC_SHA "PSK-3DES-EDE-CBC-SHA"
  553. # define TLS1_TXT_PSK_WITH_AES_128_CBC_SHA "PSK-AES128-CBC-SHA"
  554. # define TLS1_TXT_PSK_WITH_AES_256_CBC_SHA "PSK-AES256-CBC-SHA"
  555. # define TLS1_TXT_DHE_PSK_WITH_RC4_128_SHA "DHE-PSK-RC4-SHA"
  556. # define TLS1_TXT_DHE_PSK_WITH_3DES_EDE_CBC_SHA "DHE-PSK-3DES-EDE-CBC-SHA"
  557. # define TLS1_TXT_DHE_PSK_WITH_AES_128_CBC_SHA "DHE-PSK-AES128-CBC-SHA"
  558. # define TLS1_TXT_DHE_PSK_WITH_AES_256_CBC_SHA "DHE-PSK-AES256-CBC-SHA"
  559. # define TLS1_TXT_RSA_PSK_WITH_RC4_128_SHA "RSA-PSK-RC4-SHA"
  560. # define TLS1_TXT_RSA_PSK_WITH_3DES_EDE_CBC_SHA "RSA-PSK-3DES-EDE-CBC-SHA"
  561. # define TLS1_TXT_RSA_PSK_WITH_AES_128_CBC_SHA "RSA-PSK-AES128-CBC-SHA"
  562. # define TLS1_TXT_RSA_PSK_WITH_AES_256_CBC_SHA "RSA-PSK-AES256-CBC-SHA"
  563. /* PSK ciphersuites from RFC 5487 */
  564. # define TLS1_TXT_PSK_WITH_AES_128_GCM_SHA256 "PSK-AES128-GCM-SHA256"
  565. # define TLS1_TXT_PSK_WITH_AES_256_GCM_SHA384 "PSK-AES256-GCM-SHA384"
  566. # define TLS1_TXT_DHE_PSK_WITH_AES_128_GCM_SHA256 "DHE-PSK-AES128-GCM-SHA256"
  567. # define TLS1_TXT_DHE_PSK_WITH_AES_256_GCM_SHA384 "DHE-PSK-AES256-GCM-SHA384"
  568. # define TLS1_TXT_RSA_PSK_WITH_AES_128_GCM_SHA256 "RSA-PSK-AES128-GCM-SHA256"
  569. # define TLS1_TXT_RSA_PSK_WITH_AES_256_GCM_SHA384 "RSA-PSK-AES256-GCM-SHA384"
  570. # define TLS1_TXT_PSK_WITH_AES_128_CBC_SHA256 "PSK-AES128-CBC-SHA256"
  571. # define TLS1_TXT_PSK_WITH_AES_256_CBC_SHA384 "PSK-AES256-CBC-SHA384"
  572. # define TLS1_TXT_PSK_WITH_NULL_SHA256 "PSK-NULL-SHA256"
  573. # define TLS1_TXT_PSK_WITH_NULL_SHA384 "PSK-NULL-SHA384"
  574. # define TLS1_TXT_DHE_PSK_WITH_AES_128_CBC_SHA256 "DHE-PSK-AES128-CBC-SHA256"
  575. # define TLS1_TXT_DHE_PSK_WITH_AES_256_CBC_SHA384 "DHE-PSK-AES256-CBC-SHA384"
  576. # define TLS1_TXT_DHE_PSK_WITH_NULL_SHA256 "DHE-PSK-NULL-SHA256"
  577. # define TLS1_TXT_DHE_PSK_WITH_NULL_SHA384 "DHE-PSK-NULL-SHA384"
  578. # define TLS1_TXT_RSA_PSK_WITH_AES_128_CBC_SHA256 "RSA-PSK-AES128-CBC-SHA256"
  579. # define TLS1_TXT_RSA_PSK_WITH_AES_256_CBC_SHA384 "RSA-PSK-AES256-CBC-SHA384"
  580. # define TLS1_TXT_RSA_PSK_WITH_NULL_SHA256 "RSA-PSK-NULL-SHA256"
  581. # define TLS1_TXT_RSA_PSK_WITH_NULL_SHA384 "RSA-PSK-NULL-SHA384"
  582. /* SRP ciphersuite from RFC 5054 */
  583. # define TLS1_TXT_SRP_SHA_WITH_3DES_EDE_CBC_SHA "SRP-3DES-EDE-CBC-SHA"
  584. # define TLS1_TXT_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA "SRP-RSA-3DES-EDE-CBC-SHA"
  585. # define TLS1_TXT_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA "SRP-DSS-3DES-EDE-CBC-SHA"
  586. # define TLS1_TXT_SRP_SHA_WITH_AES_128_CBC_SHA "SRP-AES-128-CBC-SHA"
  587. # define TLS1_TXT_SRP_SHA_RSA_WITH_AES_128_CBC_SHA "SRP-RSA-AES-128-CBC-SHA"
  588. # define TLS1_TXT_SRP_SHA_DSS_WITH_AES_128_CBC_SHA "SRP-DSS-AES-128-CBC-SHA"
  589. # define TLS1_TXT_SRP_SHA_WITH_AES_256_CBC_SHA "SRP-AES-256-CBC-SHA"
  590. # define TLS1_TXT_SRP_SHA_RSA_WITH_AES_256_CBC_SHA "SRP-RSA-AES-256-CBC-SHA"
  591. # define TLS1_TXT_SRP_SHA_DSS_WITH_AES_256_CBC_SHA "SRP-DSS-AES-256-CBC-SHA"
  592. /* Camellia ciphersuites from RFC4132 */
  593. # define TLS1_TXT_RSA_WITH_CAMELLIA_128_CBC_SHA "CAMELLIA128-SHA"
  594. # define TLS1_TXT_DH_DSS_WITH_CAMELLIA_128_CBC_SHA "DH-DSS-CAMELLIA128-SHA"
  595. # define TLS1_TXT_DH_RSA_WITH_CAMELLIA_128_CBC_SHA "DH-RSA-CAMELLIA128-SHA"
  596. # define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA "DHE-DSS-CAMELLIA128-SHA"
  597. # define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA "DHE-RSA-CAMELLIA128-SHA"
  598. # define TLS1_TXT_ADH_WITH_CAMELLIA_128_CBC_SHA "ADH-CAMELLIA128-SHA"
  599. # define TLS1_TXT_RSA_WITH_CAMELLIA_256_CBC_SHA "CAMELLIA256-SHA"
  600. # define TLS1_TXT_DH_DSS_WITH_CAMELLIA_256_CBC_SHA "DH-DSS-CAMELLIA256-SHA"
  601. # define TLS1_TXT_DH_RSA_WITH_CAMELLIA_256_CBC_SHA "DH-RSA-CAMELLIA256-SHA"
  602. # define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA "DHE-DSS-CAMELLIA256-SHA"
  603. # define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA "DHE-RSA-CAMELLIA256-SHA"
  604. # define TLS1_TXT_ADH_WITH_CAMELLIA_256_CBC_SHA "ADH-CAMELLIA256-SHA"
  605. /* TLS 1.2 Camellia SHA-256 ciphersuites from RFC5932 */
  606. # define TLS1_TXT_RSA_WITH_CAMELLIA_128_CBC_SHA256 "CAMELLIA128-SHA256"
  607. # define TLS1_TXT_DH_DSS_WITH_CAMELLIA_128_CBC_SHA256 "DH-DSS-CAMELLIA128-SHA256"
  608. # define TLS1_TXT_DH_RSA_WITH_CAMELLIA_128_CBC_SHA256 "DH-RSA-CAMELLIA128-SHA256"
  609. # define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256 "DHE-DSS-CAMELLIA128-SHA256"
  610. # define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 "DHE-RSA-CAMELLIA128-SHA256"
  611. # define TLS1_TXT_ADH_WITH_CAMELLIA_128_CBC_SHA256 "ADH-CAMELLIA128-SHA256"
  612. # define TLS1_TXT_RSA_WITH_CAMELLIA_256_CBC_SHA256 "CAMELLIA256-SHA256"
  613. # define TLS1_TXT_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256 "DH-DSS-CAMELLIA256-SHA256"
  614. # define TLS1_TXT_DH_RSA_WITH_CAMELLIA_256_CBC_SHA256 "DH-RSA-CAMELLIA256-SHA256"
  615. # define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256 "DHE-DSS-CAMELLIA256-SHA256"
  616. # define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 "DHE-RSA-CAMELLIA256-SHA256"
  617. # define TLS1_TXT_ADH_WITH_CAMELLIA_256_CBC_SHA256 "ADH-CAMELLIA256-SHA256"
  618. # define TLS1_TXT_PSK_WITH_CAMELLIA_128_CBC_SHA256 "PSK-CAMELLIA128-SHA256"
  619. # define TLS1_TXT_PSK_WITH_CAMELLIA_256_CBC_SHA384 "PSK-CAMELLIA256-SHA384"
  620. # define TLS1_TXT_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 "DHE-PSK-CAMELLIA128-SHA256"
  621. # define TLS1_TXT_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 "DHE-PSK-CAMELLIA256-SHA384"
  622. # define TLS1_TXT_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256 "RSA-PSK-CAMELLIA128-SHA256"
  623. # define TLS1_TXT_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384 "RSA-PSK-CAMELLIA256-SHA384"
  624. # define TLS1_TXT_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 "ECDHE-PSK-CAMELLIA128-SHA256"
  625. # define TLS1_TXT_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 "ECDHE-PSK-CAMELLIA256-SHA384"
  626. /* SEED ciphersuites from RFC4162 */
  627. # define TLS1_TXT_RSA_WITH_SEED_SHA "SEED-SHA"
  628. # define TLS1_TXT_DH_DSS_WITH_SEED_SHA "DH-DSS-SEED-SHA"
  629. # define TLS1_TXT_DH_RSA_WITH_SEED_SHA "DH-RSA-SEED-SHA"
  630. # define TLS1_TXT_DHE_DSS_WITH_SEED_SHA "DHE-DSS-SEED-SHA"
  631. # define TLS1_TXT_DHE_RSA_WITH_SEED_SHA "DHE-RSA-SEED-SHA"
  632. # define TLS1_TXT_ADH_WITH_SEED_SHA "ADH-SEED-SHA"
  633. /* TLS v1.2 ciphersuites */
  634. # define TLS1_TXT_RSA_WITH_NULL_SHA256 "NULL-SHA256"
  635. # define TLS1_TXT_RSA_WITH_AES_128_SHA256 "AES128-SHA256"
  636. # define TLS1_TXT_RSA_WITH_AES_256_SHA256 "AES256-SHA256"
  637. # define TLS1_TXT_DH_DSS_WITH_AES_128_SHA256 "DH-DSS-AES128-SHA256"
  638. # define TLS1_TXT_DH_RSA_WITH_AES_128_SHA256 "DH-RSA-AES128-SHA256"
  639. # define TLS1_TXT_DHE_DSS_WITH_AES_128_SHA256 "DHE-DSS-AES128-SHA256"
  640. # define TLS1_TXT_DHE_RSA_WITH_AES_128_SHA256 "DHE-RSA-AES128-SHA256"
  641. # define TLS1_TXT_DH_DSS_WITH_AES_256_SHA256 "DH-DSS-AES256-SHA256"
  642. # define TLS1_TXT_DH_RSA_WITH_AES_256_SHA256 "DH-RSA-AES256-SHA256"
  643. # define TLS1_TXT_DHE_DSS_WITH_AES_256_SHA256 "DHE-DSS-AES256-SHA256"
  644. # define TLS1_TXT_DHE_RSA_WITH_AES_256_SHA256 "DHE-RSA-AES256-SHA256"
  645. # define TLS1_TXT_ADH_WITH_AES_128_SHA256 "ADH-AES128-SHA256"
  646. # define TLS1_TXT_ADH_WITH_AES_256_SHA256 "ADH-AES256-SHA256"
  647. /* TLS v1.2 GCM ciphersuites from RFC5288 */
  648. # define TLS1_TXT_RSA_WITH_AES_128_GCM_SHA256 "AES128-GCM-SHA256"
  649. # define TLS1_TXT_RSA_WITH_AES_256_GCM_SHA384 "AES256-GCM-SHA384"
  650. # define TLS1_TXT_DHE_RSA_WITH_AES_128_GCM_SHA256 "DHE-RSA-AES128-GCM-SHA256"
  651. # define TLS1_TXT_DHE_RSA_WITH_AES_256_GCM_SHA384 "DHE-RSA-AES256-GCM-SHA384"
  652. # define TLS1_TXT_DH_RSA_WITH_AES_128_GCM_SHA256 "DH-RSA-AES128-GCM-SHA256"
  653. # define TLS1_TXT_DH_RSA_WITH_AES_256_GCM_SHA384 "DH-RSA-AES256-GCM-SHA384"
  654. # define TLS1_TXT_DHE_DSS_WITH_AES_128_GCM_SHA256 "DHE-DSS-AES128-GCM-SHA256"
  655. # define TLS1_TXT_DHE_DSS_WITH_AES_256_GCM_SHA384 "DHE-DSS-AES256-GCM-SHA384"
  656. # define TLS1_TXT_DH_DSS_WITH_AES_128_GCM_SHA256 "DH-DSS-AES128-GCM-SHA256"
  657. # define TLS1_TXT_DH_DSS_WITH_AES_256_GCM_SHA384 "DH-DSS-AES256-GCM-SHA384"
  658. # define TLS1_TXT_ADH_WITH_AES_128_GCM_SHA256 "ADH-AES128-GCM-SHA256"
  659. # define TLS1_TXT_ADH_WITH_AES_256_GCM_SHA384 "ADH-AES256-GCM-SHA384"
  660. /* CCM ciphersuites from RFC6655 */
  661. # define TLS1_TXT_RSA_WITH_AES_128_CCM "AES128-CCM"
  662. # define TLS1_TXT_RSA_WITH_AES_256_CCM "AES256-CCM"
  663. # define TLS1_TXT_DHE_RSA_WITH_AES_128_CCM "DHE-RSA-AES128-CCM"
  664. # define TLS1_TXT_DHE_RSA_WITH_AES_256_CCM "DHE-RSA-AES256-CCM"
  665. # define TLS1_TXT_RSA_WITH_AES_128_CCM_8 "AES128-CCM8"
  666. # define TLS1_TXT_RSA_WITH_AES_256_CCM_8 "AES256-CCM8"
  667. # define TLS1_TXT_DHE_RSA_WITH_AES_128_CCM_8 "DHE-RSA-AES128-CCM8"
  668. # define TLS1_TXT_DHE_RSA_WITH_AES_256_CCM_8 "DHE-RSA-AES256-CCM8"
  669. # define TLS1_TXT_PSK_WITH_AES_128_CCM "PSK-AES128-CCM"
  670. # define TLS1_TXT_PSK_WITH_AES_256_CCM "PSK-AES256-CCM"
  671. # define TLS1_TXT_DHE_PSK_WITH_AES_128_CCM "DHE-PSK-AES128-CCM"
  672. # define TLS1_TXT_DHE_PSK_WITH_AES_256_CCM "DHE-PSK-AES256-CCM"
  673. # define TLS1_TXT_PSK_WITH_AES_128_CCM_8 "PSK-AES128-CCM8"
  674. # define TLS1_TXT_PSK_WITH_AES_256_CCM_8 "PSK-AES256-CCM8"
  675. # define TLS1_TXT_DHE_PSK_WITH_AES_128_CCM_8 "DHE-PSK-AES128-CCM8"
  676. # define TLS1_TXT_DHE_PSK_WITH_AES_256_CCM_8 "DHE-PSK-AES256-CCM8"
  677. /* CCM ciphersuites from RFC7251 */
  678. # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CCM "ECDHE-ECDSA-AES128-CCM"
  679. # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CCM "ECDHE-ECDSA-AES256-CCM"
  680. # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CCM_8 "ECDHE-ECDSA-AES128-CCM8"
  681. # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CCM_8 "ECDHE-ECDSA-AES256-CCM8"
  682. /* ECDH HMAC based ciphersuites from RFC5289 */
  683. # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_SHA256 "ECDHE-ECDSA-AES128-SHA256"
  684. # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_SHA384 "ECDHE-ECDSA-AES256-SHA384"
  685. # define TLS1_TXT_ECDH_ECDSA_WITH_AES_128_SHA256 "ECDH-ECDSA-AES128-SHA256"
  686. # define TLS1_TXT_ECDH_ECDSA_WITH_AES_256_SHA384 "ECDH-ECDSA-AES256-SHA384"
  687. # define TLS1_TXT_ECDHE_RSA_WITH_AES_128_SHA256 "ECDHE-RSA-AES128-SHA256"
  688. # define TLS1_TXT_ECDHE_RSA_WITH_AES_256_SHA384 "ECDHE-RSA-AES256-SHA384"
  689. # define TLS1_TXT_ECDH_RSA_WITH_AES_128_SHA256 "ECDH-RSA-AES128-SHA256"
  690. # define TLS1_TXT_ECDH_RSA_WITH_AES_256_SHA384 "ECDH-RSA-AES256-SHA384"
  691. /* ECDH GCM based ciphersuites from RFC5289 */
  692. # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 "ECDHE-ECDSA-AES128-GCM-SHA256"
  693. # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 "ECDHE-ECDSA-AES256-GCM-SHA384"
  694. # define TLS1_TXT_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 "ECDH-ECDSA-AES128-GCM-SHA256"
  695. # define TLS1_TXT_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 "ECDH-ECDSA-AES256-GCM-SHA384"
  696. # define TLS1_TXT_ECDHE_RSA_WITH_AES_128_GCM_SHA256 "ECDHE-RSA-AES128-GCM-SHA256"
  697. # define TLS1_TXT_ECDHE_RSA_WITH_AES_256_GCM_SHA384 "ECDHE-RSA-AES256-GCM-SHA384"
  698. # define TLS1_TXT_ECDH_RSA_WITH_AES_128_GCM_SHA256 "ECDH-RSA-AES128-GCM-SHA256"
  699. # define TLS1_TXT_ECDH_RSA_WITH_AES_256_GCM_SHA384 "ECDH-RSA-AES256-GCM-SHA384"
  700. /* TLS v1.2 PSK GCM ciphersuites from RFC5487 */
  701. # define TLS1_TXT_PSK_WITH_AES_128_GCM_SHA256 "PSK-AES128-GCM-SHA256"
  702. # define TLS1_TXT_PSK_WITH_AES_256_GCM_SHA384 "PSK-AES256-GCM-SHA384"
  703. /* ECDHE PSK ciphersuites from RFC 5489 */
  704. # define TLS1_TXT_ECDHE_PSK_WITH_RC4_128_SHA "ECDHE-PSK-RC4-SHA"
  705. # define TLS1_TXT_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA "ECDHE-PSK-3DES-EDE-CBC-SHA"
  706. # define TLS1_TXT_ECDHE_PSK_WITH_AES_128_CBC_SHA "ECDHE-PSK-AES128-CBC-SHA"
  707. # define TLS1_TXT_ECDHE_PSK_WITH_AES_256_CBC_SHA "ECDHE-PSK-AES256-CBC-SHA"
  708. # define TLS1_TXT_ECDHE_PSK_WITH_AES_128_CBC_SHA256 "ECDHE-PSK-AES128-CBC-SHA256"
  709. # define TLS1_TXT_ECDHE_PSK_WITH_AES_256_CBC_SHA384 "ECDHE-PSK-AES256-CBC-SHA384"
  710. # define TLS1_TXT_ECDHE_PSK_WITH_NULL_SHA "ECDHE-PSK-NULL-SHA"
  711. # define TLS1_TXT_ECDHE_PSK_WITH_NULL_SHA256 "ECDHE-PSK-NULL-SHA256"
  712. # define TLS1_TXT_ECDHE_PSK_WITH_NULL_SHA384 "ECDHE-PSK-NULL-SHA384"
  713. /* Camellia-CBC ciphersuites from RFC6367 */
  714. # define TLS1_TXT_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 "ECDHE-ECDSA-CAMELLIA128-SHA256"
  715. # define TLS1_TXT_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 "ECDHE-ECDSA-CAMELLIA256-SHA384"
  716. # define TLS1_TXT_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 "ECDH-ECDSA-CAMELLIA128-SHA256"
  717. # define TLS1_TXT_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 "ECDH-ECDSA-CAMELLIA256-SHA384"
  718. # define TLS1_TXT_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 "ECDHE-RSA-CAMELLIA128-SHA256"
  719. # define TLS1_TXT_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384 "ECDHE-RSA-CAMELLIA256-SHA384"
  720. # define TLS1_TXT_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256 "ECDH-RSA-CAMELLIA128-SHA256"
  721. # define TLS1_TXT_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384 "ECDH-RSA-CAMELLIA256-SHA384"
  722. /* draft-ietf-tls-chacha20-poly1305-03 */
  723. # define TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305 "ECDHE-RSA-CHACHA20-POLY1305"
  724. # define TLS1_TXT_ECDHE_ECDSA_WITH_CHACHA20_POLY1305 "ECDHE-ECDSA-CHACHA20-POLY1305"
  725. # define TLS1_TXT_DHE_RSA_WITH_CHACHA20_POLY1305 "DHE-RSA-CHACHA20-POLY1305"
  726. # define TLS1_TXT_PSK_WITH_CHACHA20_POLY1305 "PSK-CHACHA20-POLY1305"
  727. # define TLS1_TXT_ECDHE_PSK_WITH_CHACHA20_POLY1305 "ECDHE-PSK-CHACHA20-POLY1305"
  728. # define TLS1_TXT_DHE_PSK_WITH_CHACHA20_POLY1305 "DHE-PSK-CHACHA20-POLY1305"
  729. # define TLS1_TXT_RSA_PSK_WITH_CHACHA20_POLY1305 "RSA-PSK-CHACHA20-POLY1305"
  730. # define TLS_CT_RSA_SIGN 1
  731. # define TLS_CT_DSS_SIGN 2
  732. # define TLS_CT_RSA_FIXED_DH 3
  733. # define TLS_CT_DSS_FIXED_DH 4
  734. # define TLS_CT_ECDSA_SIGN 64
  735. # define TLS_CT_RSA_FIXED_ECDH 65
  736. # define TLS_CT_ECDSA_FIXED_ECDH 66
  737. # define TLS_CT_GOST01_SIGN 22
  738. # define TLS_CT_GOST12_SIGN 238
  739. # define TLS_CT_GOST12_512_SIGN 239
  740. /*
  741. * when correcting this number, correct also SSL3_CT_NUMBER in ssl3.h (see
  742. * comment there)
  743. */
  744. # define TLS_CT_NUMBER 9
  745. # define TLS1_FINISH_MAC_LENGTH 12
  746. # define TLS_MD_MAX_CONST_SIZE 22
  747. # define TLS_MD_CLIENT_FINISH_CONST "client finished"
  748. # define TLS_MD_CLIENT_FINISH_CONST_SIZE 15
  749. # define TLS_MD_SERVER_FINISH_CONST "server finished"
  750. # define TLS_MD_SERVER_FINISH_CONST_SIZE 15
  751. # define TLS_MD_KEY_EXPANSION_CONST "key expansion"
  752. # define TLS_MD_KEY_EXPANSION_CONST_SIZE 13
  753. # define TLS_MD_CLIENT_WRITE_KEY_CONST "client write key"
  754. # define TLS_MD_CLIENT_WRITE_KEY_CONST_SIZE 16
  755. # define TLS_MD_SERVER_WRITE_KEY_CONST "server write key"
  756. # define TLS_MD_SERVER_WRITE_KEY_CONST_SIZE 16
  757. # define TLS_MD_IV_BLOCK_CONST "IV block"
  758. # define TLS_MD_IV_BLOCK_CONST_SIZE 8
  759. # define TLS_MD_MASTER_SECRET_CONST "master secret"
  760. # define TLS_MD_MASTER_SECRET_CONST_SIZE 13
  761. # define TLS_MD_EXTENDED_MASTER_SECRET_CONST "extended master secret"
  762. # define TLS_MD_EXTENDED_MASTER_SECRET_CONST_SIZE 22
  763. # ifdef CHARSET_EBCDIC
  764. # undef TLS_MD_CLIENT_FINISH_CONST
  765. /*
  766. * client finished
  767. */
  768. # define TLS_MD_CLIENT_FINISH_CONST "\x63\x6c\x69\x65\x6e\x74\x20\x66\x69\x6e\x69\x73\x68\x65\x64"
  769. # undef TLS_MD_SERVER_FINISH_CONST
  770. /*
  771. * server finished
  772. */
  773. # define TLS_MD_SERVER_FINISH_CONST "\x73\x65\x72\x76\x65\x72\x20\x66\x69\x6e\x69\x73\x68\x65\x64"
  774. # undef TLS_MD_SERVER_WRITE_KEY_CONST
  775. /*
  776. * server write key
  777. */
  778. # define TLS_MD_SERVER_WRITE_KEY_CONST "\x73\x65\x72\x76\x65\x72\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79"
  779. # undef TLS_MD_KEY_EXPANSION_CONST
  780. /*
  781. * key expansion
  782. */
  783. # define TLS_MD_KEY_EXPANSION_CONST "\x6b\x65\x79\x20\x65\x78\x70\x61\x6e\x73\x69\x6f\x6e"
  784. # undef TLS_MD_CLIENT_WRITE_KEY_CONST
  785. /*
  786. * client write key
  787. */
  788. # define TLS_MD_CLIENT_WRITE_KEY_CONST "\x63\x6c\x69\x65\x6e\x74\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79"
  789. # undef TLS_MD_SERVER_WRITE_KEY_CONST
  790. /*
  791. * server write key
  792. */
  793. # define TLS_MD_SERVER_WRITE_KEY_CONST "\x73\x65\x72\x76\x65\x72\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79"
  794. # undef TLS_MD_IV_BLOCK_CONST
  795. /*
  796. * IV block
  797. */
  798. # define TLS_MD_IV_BLOCK_CONST "\x49\x56\x20\x62\x6c\x6f\x63\x6b"
  799. # undef TLS_MD_MASTER_SECRET_CONST
  800. /*
  801. * master secret
  802. */
  803. # define TLS_MD_MASTER_SECRET_CONST "\x6d\x61\x73\x74\x65\x72\x20\x73\x65\x63\x72\x65\x74"
  804. # undef TLS_MD_EXTENDED_MASTER_SECRET_CONST
  805. /*
  806. * extended master secret
  807. */
  808. # 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"
  809. # endif
  810. /* TLS Session Ticket extension struct */
  811. struct tls_session_ticket_ext_st {
  812. unsigned short length;
  813. void *data;
  814. };
  815. #ifdef __cplusplus
  816. }
  817. #endif
  818. #endif