ssl.h 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705
  1. /* ssl.h
  2. *
  3. * Copyright (C) 2006-2015 wolfSSL Inc.
  4. *
  5. * This file is part of wolfSSL. (formerly known as CyaSSL)
  6. *
  7. * wolfSSL is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * wolfSSL is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * a with this program; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  20. */
  21. /*
  22. * ssl.h makes wolfssl backwards compatibile with cyassl
  23. */
  24. #ifndef WOLFSSL_CYASSL_H_
  25. #define WOLFSSL_CYASSL_H_
  26. /*
  27. * Name change
  28. * include the new ssl.h
  29. */
  30. #include <wolfssl/ssl.h>
  31. #include <cyassl/ctaocrypt/types.h>
  32. #include <cyassl/ctaocrypt/settings.h>
  33. #ifdef __cplusplus
  34. extern "C" {
  35. #endif
  36. #ifdef _WIN32
  37. /* wincrypt.h clashes */
  38. #undef X509_NAME
  39. #endif
  40. #ifdef CYASSL_TIRTOS
  41. #undef CYASSL_TIRTOS
  42. #define CYASSL_TIRTOS WOLFSSL_TIRTOS
  43. #endif
  44. #define CYASSL WOLFSSL
  45. #define DEBUG_CYASSL DEBUG_WOLFSSL
  46. #define CYASSL_CTX WOLFSSL_CTX
  47. #define CYASSL_METHOD WOLFSSL_METHOD
  48. #define CYASSL_SESSION WOLFSSL_SESSION
  49. #define CYASSL_X509 WOLFSSL_X509
  50. #define CYASSL_X509_NAME WOLFSSL_X509_NAME
  51. #define CYASSL_X509_CHAIN WOLFSSL_X509_CHAIN
  52. #ifdef WOLFSSL_SNIFFER
  53. #define CYASSL_SNIFFER WOLFSSL_SNIFFER
  54. #endif
  55. /* redeclare guard */
  56. #define CYASSL_TYPES_DEFINED WOLFSSL_TYPES_DEFINED
  57. /* legacy defines */
  58. #define yasslIP wolfSSLIP /**/
  59. #define yasslPort wolfSSLPort /**/
  60. /* cyassl/ssl.h (structs) */
  61. #define CYASSL_RSA WOLFSSL_RSA
  62. #define CYASSL_DSA WOLFSSL_DSA
  63. #define CYASSL_BIO WOLFSSL_BIO
  64. #define CYASSL_CIPHER WOLFSSL_CIPHER
  65. #define CYASSL_MD4_CTX WOLFSSL_MD4_CTX
  66. #define CYASSL_MFL_2_9 WOLFSSL_MFL_2_9 /**/
  67. #define CYASSL_MFL_2_13 WOLFSSL_MFL_2_13 /**/
  68. #define CYASSL_EVP_PKEY WOLFSSL_EVP_PKEY
  69. #define CYASSL_X509_CRL WOLFSSL_X509_CRL
  70. #define CYASSL_ASN1_TIME WOLFSSL_ASN1_TIME
  71. #define CYASSL_BIO_METHOD WOLFSSL_BIO_METHOD
  72. #define CYASSL_X509_STORE WOLFSSL_X509_STORE
  73. #define CYASSL_X509_OBJECT WOLFSSL_X509_OBJECT
  74. #define CYASSL_X509_LOOKUP WOLFSSL_X509_LOOKUP
  75. #define CYASSL_ASN1_OBJECT WOLFSSL_ASN1_OBJECT
  76. #define CYASSL_ASN1_STRING WOLFSSL_ASN1_STRING
  77. #define CYASSL_COMP_METHOD WOLFSSL_COMP_METHOD
  78. #define CYASSL_CRL_CHECKALL WOLFSSL_CRL_CHECKALL
  79. #define CYASSL_ASN1_INTEGER WOLFSSL_ASN1_INTEGER
  80. #define CYASSL_X509_REVOKED WOLFSSL_X509_REVOKED
  81. #define CYASSL_dynlock_value WOLFSSL_dynlock_value
  82. #define CYASSL_X509_EXTENSION WOLFSSL_X509_EXTENSION
  83. #define CYASSL_X509_STORE_CTX WOLFSSL_X509_STORE_CTX
  84. #define CYASSL_X509_LOOKUP_METHOD WOLFSSL_X509_LOOKUP_METHOD
  85. #define CyaSSL_LoadCRL wolfSSL_LoadCRL
  86. #define CyaSSL_EnableCRL wolfSSL_EnableCRL
  87. #define CyaSSL_SetCRL_Cb wolfSSL_SetCRL_Cb
  88. /* cyassl/test.h */
  89. #ifdef CyaSSL_TEST_H
  90. #define CYASSL_THREAD WOLFSSL_THREAD
  91. #endif
  92. /* src/ssl.c */
  93. #define CYASSL_CRL WOLFSSL_CRL
  94. #define CYASSL_SSLV3 WOLFSSL_SSLV3
  95. #define CYASSL_TLSV1 WOLFSSL_TLSV1
  96. #define CYASSL_TLSV1_1 WOLFSSL_TLSV1_1
  97. #define CYASSL_TLSV1_2 WOLFSSL_TLSV1_2
  98. #define CYASSL_USER_CA WOLFSSL_USER_CA
  99. #define CYASSL_CLIENT_END WOLFSSL_CLIENT_END
  100. #define CYASSL_CERT_MANAGER WOLFSSL_CERT_MANAGER
  101. #define MAX_CYASSL_FILE_SIZE MAX_WOLFSSL_FILE_SIZE
  102. #define CyaSSL_get_cipher wolfSSL_get_cipher
  103. #define CyaSSL_get_ciphers wolfSSL_get_ciphers
  104. #define CyaSSL_KeyPemToDer wolfSSL_KeyPemToDer
  105. #define CyaSSL_get_version wolfSSL_get_version
  106. #define CyaSSL_SetServerID wolfSSL_SetServerID
  107. #define CyaSSL_use_old_poly wolfSSL_use_old_poly
  108. #define CyaSSL_SetCertCbCtx wolfSSL_SetCertCbCtx
  109. #define CyaSSL_CertPemToDer wolfSSL_CertPemToDer
  110. #define CyaSSL_get_shutdown wolfSSL_get_shutdown
  111. #define CyaSSL_SetMinVersion wolfSSL_SetMinVersion
  112. #define CyaSSL_CTX_UnloadCAs wolfSSL_CTX_UnloadCAs
  113. #define CyaSSL_session_reused wolfSSL_session_reused
  114. #define CyaSSL_UnloadCertsKeys wolfSSL_UnloadCertsKeys
  115. #define CyaSSL_CIPHER_get_name wolfSSL_CIPHER_get_name
  116. #define CyaSSL_is_init_finished wolfSSL_is_init_finished
  117. #define CyaSSL_get_alert_history wolfSSL_get_alert_history
  118. #define CyaSSL_get_current_cipher wolfSSL_get_current_cipher
  119. #define CyaSSL_CertManagerUnloadCAs wolfSSL_CertManagerUnloadCAs
  120. #define CyaSSL_CertManagerEnableOCSP wolfSSL_CertManagerEnableOCSP
  121. #define CyaSSL_CTX_check_private_key wolfSSL_CTX_check_private_key
  122. #define CyaSSL_CertManagerDisableOCSP wolfSSL_CertManagerDisableOCSP
  123. #define CyaSSL_get_current_cipher_suite wolfSSL_get_current_cipher_suite
  124. #define CyaSSL_CTX_load_verify_locations wolfSSL_CTX_load_verify_locations
  125. #define CyaSSL_CTX_set_default_passwd_cb wolfSSL_CTX_set_default_passwd_cb
  126. #define CyaSSL_save_session_cache wolfSSL_save_session_cache
  127. #define CyaSSL_restore_session_cache wolfSSL_restore_session_cache
  128. #define CyaSSL_memsave_session_cache wolfSSL_memsave_session_cache
  129. #define CyaSSL_memrestore_session_cache wolfSSL_memrestore_session_cache
  130. #define CyaSSL_get_session_cache_memsize wolfSSL_get_session_cache_memsize
  131. /* certificate cache persistence, uses ctx since certs are per ctx */
  132. #define CyaSSL_CTX_save_cert_cache wolfSSL_CTX_save_cert_cache
  133. #define CyaSSL_CTX_restore_cert_cache wolfSSL_CTX_restore_cert_cache
  134. #define CyaSSL_CTX_memsave_cert_cache wolfSSL_CTX_memsave_cert_cache
  135. #define CyaSSL_CTX_memrestore_cert_cache wolfSSL_CTX_memrestore_cert_cache
  136. #define CyaSSL_CTX_get_cert_cache_memsize wolfSSL_CTX_get_cert_cache_memsize
  137. /* wolfSSL extensions */
  138. /* get wolfSSL peer X509_CHAIN */
  139. #define CyaSSL_get_chain_count wolfSSL_get_chain_count
  140. /* index cert length */
  141. #define CyaSSL_get_chain_length wolfSSL_get_chain_length
  142. /* index cert in X509 */
  143. #define CyaSSL_get_chain_X509 wolfSSL_get_chain_X509
  144. /* free X509 */
  145. #define CyaSSL_FreeX509 wolfSSL_FreeX509
  146. /* get index cert in PEM */
  147. #define CyaSSL_X509_get_subjectCN wolfSSL_X509_get_subjectCN
  148. #define CyaSSL_X509_get_der wolfSSL_X509_get_der
  149. #define CyaSSL_X509_notBefore wolfSSL_X509_notBefore
  150. #define CyaSSL_X509_notAfter wolfSSL_X509_notAfter
  151. #define CyaSSL_X509_version wolfSSL_X509_version
  152. #define CyaSSL_cmp_peer_cert_to_file wolfSSL_cmp_peer_cert_to_file
  153. #define CyaSSL_X509_get_next_altname wolfSSL_X509_get_next_altname
  154. #define CyaSSL_X509_d2i wolfSSL_X509_d2i
  155. #ifndef NO_FILESYSTEM
  156. #ifndef NO_STDIO_FILESYSTEM
  157. #define CyaSSL_X509_d2i_fp wolfSSL_X509_d2i_fp
  158. #endif
  159. #define CyaSSL_X509_load_certificate_file wolfSSL_X509_load_certificate_file
  160. #endif
  161. #ifdef WOLFSSL_SEP
  162. #define CyaSSL_X509_get_device_type wolfSSL_X509_get_device_type
  163. #define CyaSSL_X509_get_hw_type wolfSSL_X509_get_hw_type
  164. #define CyaSSL_X509_get_hw_serial_number wolfSSL_X509_get_hw_serial_number
  165. #endif
  166. #define CyaSSL_CTX_SetGenCookie wolfSSL_CTX_SetGenCookie
  167. #define CyaSSL_SetCookieCtx wolfSSL_SetCookieCtx
  168. #define CyaSSL_GetCookieCtx wolfSSL_GetCookieCtx
  169. #define CyaSSL_ERR_get_error_line_data wolfSSL_ERR_get_error_line_data
  170. #define CyaSSL_ERR_get_error wolfSSL_ERR_get_error
  171. #define CyaSSL_ERR_clear_error wolfSSL_ERR_clear_error
  172. #define CyaSSL_RAND_status wolfSSL_RAND_status
  173. #define CyaSSL_RAND_bytes wolfSSL_RAND_bytes
  174. #define CyaSSL_CTX_set_options wolfSSL_CTX_set_options
  175. #define CyaSSL_ERR_free_strings wolfSSL_ERR_free_strings
  176. #define CyaSSL_ERR_remove_state wolfSSL_ERR_remove_state
  177. #define CyaSSL_EVP_cleanup wolfSSL_EVP_cleanup
  178. #define CyaSSL_cleanup_all_ex_data wolfSSL_cleanup_all_ex_data
  179. #define CyaSSL_CTX_set_mode wolfSSL_CTX_set_mode
  180. #define CyaSSL_CTX_get_mode wolfSSL_CTX_get_mode
  181. #define CyaSSL_CTX_set_default_read_ahead wolfSSL_CTX_set_default_read_ahead
  182. #define CyaSSL_CTX_sess_set_cache_size wolfSSL_CTX_sess_set_cache_size
  183. #define CyaSSL_CTX_set_default_verify_paths wolfSSL_CTX_set_default_verify_paths
  184. #define CyaSSL_CTX_set_session_id_context wolfSSL_CTX_set_session_id_context
  185. #define CyaSSL_get_peer_certificate wolfSSL_get_peer_certificate
  186. #define CyaSSL_BIO_printf wolfSSL_BIO_printf
  187. #define CyaSSL_ASN1_UTCTIME_print wolfSSL_ASN1_UTCTIME_print
  188. #define CyaSSL_sk_num wolfSSL_sk_num
  189. #define CyaSSL_sk_value wolfSSL_sk_value
  190. /* stunnel 4.28 needs */
  191. #define CyaSSL_CTX_get_ex_data wolfSSL_CTX_get_ex_data
  192. #define CyaSSL_CTX_set_ex_data wolfSSL_CTX_set_ex_data
  193. #define CyaSSL_CTX_sess_set_get_cb wolfSSL_CTX_sess_set_get_cb
  194. #define CyaSSL_CTX_sess_set_new_cb wolfSSL_CTX_sess_set_new_cb
  195. #define CyaSSL_CTX_sess_set_remove_cb wolfSSL_CTX_sess_set_remove_cb
  196. #define CyaSSL_i2d_SSL_SESSION wolfSSL_i2d_SSL_SESSION
  197. #define CyaSSL_d2i_SSL_SESSION wolfSSL_d2i_SSL_SESSION
  198. #define CyaSSL_SESSION_get_timeout wolfSSL_SESSION_get_timeout
  199. #define CyaSSL_SESSION_get_time wolfSSL_SESSION_get_time
  200. #define CyaSSL_CTX_get_ex_new_index wolfSSL_CTX_get_ex_new_index
  201. /* io.c */
  202. #define CYASSL_CBIO_ERR_ISR WOLFSSL_CBIO_ERR_ISR
  203. #define CYASSL_CBIO_ERR_TIMEOUT WOLFSSL_CBIO_ERR_TIMEOUT
  204. #define CYASSL_CBIO_ERR_GENERAL WOLFSSL_CBIO_ERR_GENERAL
  205. #define CYASSL_CBIO_ERR_CONN_RST WOLFSSL_CBIO_ERR_CONN_RST
  206. #define CYASSL_CBIO_ERR_WANT_READ WOLFSSL_CBIO_ERR_WANT_READ
  207. #define CYASSL_CBIO_ERR_WANT_WRITE WOLFSSL_CBIO_ERR_WANT_WRITE
  208. #define CYASSL_CBIO_ERR_CONN_CLOSE WOLFSSL_CBIO_ERR_CONN_CLOSE
  209. #define CyaSSL_GetIOReadCtx wolfSSL_GetIOReadCtx
  210. #define CyaSSL_GetIOWriteCtx wolfSSL_GetIOWriteCtx
  211. /* src/tls.c */
  212. #define CYASSL_SERVER_END WOLFSSL_SERVER_END
  213. #define CYASSL_TLS_HMAC_INNER_SZ WOLFSSL_TLS_HMAC_INNER_SZ
  214. #define CyaSSL_DeriveTlsKeys wolfSSL_DeriveTlsKeys
  215. #define CyaSSL_make_eap_keys wolfSSL_make_eap_keys
  216. #define CyaSSL_MakeTlsMasterSecret wolfSSL_MakeTlsMasterSecret
  217. /* src/internal.c */
  218. #define CYASSL_CHAIN_CA WOLFSSL_CHAIN_CA
  219. #define CYASSL_ALERT_HISTORY WOLFSSL_ALERT_HISTORY
  220. #define CYASSL_SESSION_TIMEOUT WOLFSSL_SESSION_TIMEOUT
  221. #define CYASSL_CBIO_ERR_CONN_RST WOLFSSL_CBIO_ERR_CONN_RST
  222. #define cyassl_rc4 wolfssl_rc4
  223. #define cyassl_aes wolfssl_aes
  224. #define cyassl_chacha wolfssl_chacha
  225. #define CyaSSL_ERR_reason_error_string wolfSSL_ERR_reason_error_string
  226. #define CyaSSL_set_ex_data wolfSSL_set_ex_data
  227. #define CyaSSL_get_shutdown wolfSSL_get_shutdown
  228. #define CyaSSL_set_rfd wolfSSL_set_rfd
  229. #define CyaSSL_set_wfd wolfSSL_set_wfd
  230. #define CyaSSL_set_shutdown wolfSSL_set_shutdown
  231. #define CyaSSL_set_session_id_context wolfSSL_set_session_id_context
  232. #define CyaSSL_set_connect_state wolfSSL_set_connect_state
  233. #define CyaSSL_set_accept_state wolfSSL_set_accept_state
  234. #define CyaSSL_session_reused wolfSSL_session_reused
  235. #define CyaSSL_SESSION_free wolfSSL_SESSION_free
  236. #define CyaSSL_is_init_finished wolfSSL_is_init_finished
  237. #define CyaSSL_get_version wolfSSL_get_version
  238. #define CyaSSL_get_current_cipher_suite wolfSSL_get_current_cipher_suite
  239. #define CyaSSL_get_current_cipher wolfSSL_get_current_cipher
  240. #define CyaSSL_CIPHER_description wolfSSL_CIPHER_description
  241. #define CyaSSL_CIPHER_get_name wolfSSL_CIPHER_get_name
  242. #define CyaSSL_get_cipher wolfSSL_get_cipher
  243. #define CyaSSL_get1_session wolfSSL_get1_session
  244. #define CyaSSL_X509_free wolfSSL_X509_free
  245. #define CyaSSL_OPENSSL_free wolfSSL_OPENSSL_free
  246. #define CyaSSL_OCSP_parse_url wolfSSL_OCSP_parse_url
  247. #define CyaSSLv23_client_method wolfSSLv23_client_method
  248. #define CyaSSLv2_client_method wolfSSLv2_client_method
  249. #define CyaSSLv2_server_method wolfSSLv2_server_method
  250. #define CyaSSL_MD4_Init wolfSSL_MD4_Init
  251. #define CyaSSL_MD4_Update wolfSSL_MD4_Update
  252. #define CyaSSL_MD4_Final wolfSSL_MD4_Final
  253. #define CyaSSL_BIO_new wolfSSL_BIO_new
  254. #define CyaSSL_BIO_free wolfSSL_BIO_free
  255. #define CyaSSL_BIO_free_all wolfSSL_BIO_free_all
  256. #define CyaSSL_BIO_read wolfSSL_BIO_read
  257. #define CyaSSL_BIO_write wolfSSL_BIO_write
  258. #define CyaSSL_BIO_push wolfSSL_BIO_push
  259. #define CyaSSL_BIO_pop wolfSSL_BIO_pop
  260. #define CyaSSL_BIO_flush wolfSSL_BIO_flush
  261. #define CyaSSL_BIO_pending wolfSSL_BIO_pending
  262. #define CyaSSL_BIO_f_buffer wolfSSL_BIO_f_buffer
  263. #define CyaSSL_BIO_set_write_buffer_size wolfSSL_BIO_set_write_buffer_size
  264. #define CyaSSL_BIO_f_ssl wolfSSL_BIO_f_ssl
  265. #define CyaSSL_BIO_new_socket wolfSSL_BIO_new_socket
  266. #define CyaSSL_BIO_eof wolfSSL_BIO_eof
  267. #define CyaSSL_BIO_s_mem wolfSSL_BIO_s_mem
  268. #define CyaSSL_BIO_f_base64 wolfSSL_BIO_f_base64
  269. #define CyaSSL_BIO_set_flags wolfSSL_BIO_set_flags
  270. #define CyaSSL_BIO_get_mem_data wolfSSL_BIO_get_mem_data
  271. #define CyaSSL_BIO_new_mem_buf wolfSSL_BIO_new_mem_buf
  272. #define CyaSSL_BIO_set_ssl wolfSSL_BIO_set_ssl
  273. #define CyaSSL_set_bio wolfSSL_set_bio
  274. #define CyaSSL_add_all_algorithms wolfSSL_add_all_algorithms
  275. #define CyaSSL_RAND_screen wolfSSL_RAND_screen
  276. #define CyaSSL_RAND_file_name wolfSSL_RAND_file_name
  277. #define CyaSSL_RAND_write_file wolfSSL_RAND_write_file
  278. #define CyaSSL_RAND_load_file wolfSSL_RAND_load_file
  279. #define CyaSSL_RAND_egd wolfSSL_RAND_egd
  280. #define CyaSSL_RAND_seed wolfSSL_RAND_seed
  281. #define CyaSSL_RAND_add wolfSSL_RAND_add
  282. #define CyaSSL_COMP_zlib wolfSSL_COMP_zlib
  283. #define CyaSSL_COMP_rle wolfSSL_COMP_rle
  284. #define CyaSSL_COMP_add_compression_method wolfSSL_COMP_add_compression_method
  285. #define CyaSSL_set_dynlock_create_callback wolfSSL_set_dynlock_create_callback
  286. #define CyaSSL_set_dynlock_lock_callback wolfSSL_set_dynlock_lock_callback
  287. #define CyaSSL_set_dynlock_destroy_callback wolfSSL_set_dynlock_destroy_callback
  288. #define CyaSSL_get_ex_new_index wolfSSL_get_ex_new_index
  289. #define CyaSSL_set_id_callback wolfSSL_set_id_callback
  290. #define CyaSSL_set_locking_callback wolfSSL_set_locking_callback
  291. #define CyaSSL_num_locks wolfSSL_num_locks
  292. #define CyaSSL_X509_STORE_CTX_get_current_cert wolfSSL_X509_STORE_CTX_get_current_cert
  293. #define CyaSSL_X509_STORE_CTX_get_error wolfSSL_X509_STORE_CTX_get_error
  294. #define CyaSSL_X509_STORE_CTX_get_error_depth wolfSSL_X509_STORE_CTX_get_error_depth
  295. #define CyaSSL_X509_NAME_oneline wolfSSL_X509_NAME_oneline
  296. #define CyaSSL_X509_get_issuer_name wolfSSL_X509_get_issuer_name
  297. #define CyaSSL_X509_get_subject_name wolfSSL_X509_get_subject_name
  298. #define CyaSSL_X509_ext_isSet_by_NID wolfSSL_X509_ext_isSet_by_NID
  299. #define CyaSSL_X509_ext_get_critical_by_NID wolfSSL_X509_ext_get_critical_by_NID
  300. #define CyaSSL_X509_get_isCA wolfSSL_X509_get_isCA
  301. #define CyaSSL_X509_get_isSet_pathLength wolfSSL_X509_get_isSet_pathLength
  302. #define CyaSSL_X509_get_pathLength wolfSSL_X509_get_pathLength
  303. #define CyaSSL_X509_get_keyUsage wolfSSL_X509_get_keyUsage
  304. #define CyaSSL_X509_get_authorityKeyID wolfSSL_X509_get_authorityKeyID
  305. #define CyaSSL_X509_get_subjectKeyID wolfSSL_X509_get_subjectKeyID
  306. #define CyaSSL_X509_NAME_entry_count wolfSSL_X509_NAME_entry_count
  307. #define CyaSSL_X509_NAME_get_text_by_NID wolfSSL_X509_NAME_get_text_by_NID
  308. #define CyaSSL_X509_verify_cert wolfSSL_X509_verify_cert
  309. #define CyaSSL_X509_verify_cert_error_string wolfSSL_X509_verify_cert_error_string
  310. #define CyaSSL_X509_get_signature_type wolfSSL_X509_get_signature_type
  311. #define CyaSSL_X509_get_signature wolfSSL_X509_get_signature
  312. #define CyaSSL_X509_LOOKUP_add_dir wolfSSL_X509_LOOKUP_add_dir
  313. #define CyaSSL_X509_LOOKUP_load_file wolfSSL_X509_LOOKUP_load_file
  314. #define CyaSSL_X509_LOOKUP_hash_dir wolfSSL_X509_LOOKUP_hash_dir
  315. #define CyaSSL_X509_LOOKUP_file wolfSSL_X509_LOOKUP_file
  316. #define CyaSSL_X509_STORE_add_lookup wolfSSL_X509_STORE_add_lookup
  317. #define CyaSSL_X509_STORE_new wolfSSL_X509_STORE_new
  318. #define CyaSSL_X509_STORE_free wolfSSL_X509_STORE_free
  319. #define CyaSSL_X509_STORE_add_cert wolfSSL_X509_STORE_add_cert
  320. #define CyaSSL_X509_STORE_set_default_paths wolfSSL_X509_STORE_set_default_paths
  321. #define CyaSSL_X509_STORE_get_by_subject wolfSSL_X509_STORE_get_by_subject
  322. #define CyaSSL_X509_STORE_CTX_new wolfSSL_X509_STORE_CTX_new
  323. #define CyaSSL_X509_STORE_CTX_init wolfSSL_X509_STORE_CTX_init
  324. #define CyaSSL_X509_STORE_CTX_free wolfSSL_X509_STORE_CTX_free
  325. #define CyaSSL_X509_STORE_CTX_cleanup wolfSSL_X509_STORE_CTX_cleanup
  326. #define CyaSSL_X509_CRL_get_lastUpdate wolfSSL_X509_CRL_get_lastUpdate
  327. #define CyaSSL_X509_CRL_get_nextUpdate wolfSSL_X509_CRL_get_nextUpdate
  328. #define CyaSSL_X509_get_pubkey wolfSSL_X509_get_pubkey
  329. #define CyaSSL_X509_CRL_verify wolfSSL_X509_CRL_verify
  330. #define CyaSSL_X509_STORE_CTX_set_error wolfSSL_X509_STORE_CTX_set_error
  331. #define CyaSSL_X509_OBJECT_free_contents wolfSSL_X509_OBJECT_free_contents
  332. #define CyaSSL_EVP_PKEY_free wolfSSL_EVP_PKEY_free
  333. #define CyaSSL_X509_cmp_current_time wolfSSL_X509_cmp_current_time
  334. #define CyaSSL_sk_X509_REVOKED_num wolfSSL_sk_X509_REVOKED_num
  335. #define CyaSSL_X509_CRL_get_REVOKED wolfSSL_X509_CRL_get_REVOKED
  336. #define CyaSSL_sk_X509_REVOKED_value wolfSSL_sk_X509_REVOKED_value
  337. #define CyaSSL_X509_get_serialNumber wolfSSL_X509_get_serialNumber
  338. #define CyaSSL_ASN1_TIME_print wolfSSL_ASN1_TIME_print
  339. #define CyaSSL_ASN1_INTEGER_cmp wolfSSL_ASN1_INTEGER_cmp
  340. #define CyaSSL_ASN1_INTEGER_get wolfSSL_ASN1_INTEGER_get
  341. #define CyaSSL_load_client_CA_file wolfSSL_load_client_CA_file
  342. #define CyaSSL_CTX_set_client_CA_list wolfSSL_CTX_set_client_CA_list
  343. #define CyaSSL_X509_STORE_CTX_get_ex_data wolfSSL_X509_STORE_CTX_get_ex_data
  344. #define CyaSSL_get_ex_data_X509_STORE_CTX_idx wolfSSL_get_ex_data_X509_STORE_CTX_idx
  345. #define CyaSSL_get_ex_data wolfSSL_get_ex_data
  346. #define CyaSSL_CTX_set_default_passwd_cb_userdata wolfSSL_CTX_set_default_passwd_cb_userdata
  347. #define CyaSSL_CTX_set_default_passwd_cb wolfSSL_CTX_set_default_passwd_cb
  348. #define CyaSSL_CTX_set_info_callback wolfSSL_CTX_set_info_callback
  349. #define CyaSSL_ERR_peek_error wolfSSL_ERR_peek_error
  350. #define CyaSSL_GET_REASON wolfSSL_GET_REASON
  351. #define CyaSSL_alert_type_string_long wolfSSL_alert_type_string_long
  352. #define CyaSSL_alert_desc_string_long wolfSSL_alert_desc_string_long
  353. #define CyaSSL_state_string_long wolfSSL_state_string_long
  354. #define CyaSSL_RSA_generate_key wolfSSL_RSA_generate_key
  355. #define CyaSSL_CTX_set_tmp_rsa_callback wolfSSL_CTX_set_tmp_rsa_callback
  356. #define CyaSSL_PEM_def_callback wolfSSL_PEM_def_callback
  357. #define CyaSSL_CTX_sess_accept wolfSSL_CTX_sess_accept
  358. #define CyaSSL_CTX_sess_connect wolfSSL_CTX_sess_connect
  359. #define CyaSSL_CTX_sess_accept_good wolfSSL_CTX_sess_accept_good
  360. #define CyaSSL_CTX_sess_connect_good wolfSSL_CTX_sess_connect_good
  361. #define CyaSSL_CTX_sess_accept_renegotiate wolfSSL_CTX_sess_accept_renegotiate
  362. #define CyaSSL_CTX_sess_connect_renegotiate wolfSSL_CTX_sess_connect_renegotiate
  363. #define CyaSSL_CTX_sess_hits wolfSSL_CTX_sess_hits
  364. #define CyaSSL_CTX_sess_cb_hits wolfSSL_CTX_sess_cb_hits
  365. #define CyaSSL_CTX_sess_cache_full wolfSSL_CTX_sess_cache_full
  366. #define CyaSSL_CTX_sess_misses wolfSSL_CTX_sess_misses
  367. #define CyaSSL_CTX_sess_timeouts wolfSSL_CTX_sess_timeouts
  368. #define CyaSSL_CTX_sess_number wolfSSL_CTX_sess_number
  369. #define CyaSSL_CTX_sess_get_cache_size wolfSSL_CTX_sess_get_cache_size
  370. /* src/keys.c */
  371. #define cyassl_triple_des wolfssl_triple_des
  372. /* Initialization and Shutdown */
  373. #define CyaSSL_Init wolfSSL_Init
  374. #define CyaSSL_library_init wolfSSL_library_init
  375. #define CyaSSL_Cleanup wolfSSL_Cleanup
  376. #define CyaSSL_shutdown wolfSSL_shutdown
  377. /* Certs and keys */
  378. #define CyaSSL_SetTmpDH wolfSSL_SetTmpDH
  379. #define CyaSSL_KeepArrays wolfSSL_KeepArrays
  380. #define CyaSSL_FreeArrays wolfSSL_FreeArrays
  381. #define CyaSSL_SetTmpDH_file wolfSSL_SetTmpDH_file
  382. #define CyaSSL_use_PrivateKey_buffer wolfSSL_use_PrivateKey_buffer
  383. #define CyaSSL_use_certificate_buffer wolfSSL_use_certificate_buffer
  384. #define CyaSSL_CTX_load_verify_buffer wolfSSL_CTX_load_verify_buffer
  385. #define CyaSSL_CTX_use_PrivateKey_file wolfSSL_CTX_use_PrivateKey_file
  386. #define CyaSSL_CTX_use_certificate_file wolfSSL_CTX_use_certificate_file
  387. #define CyaSSL_CTX_use_PrivateKey_buffer wolfSSL_CTX_use_PrivateKey_buffer
  388. #define CyaSSL_CTX_use_PrivateKey_buffer wolfSSL_CTX_use_PrivateKey_buffer
  389. #define CyaSSL_CTX_use_certificate_buffer wolfSSL_CTX_use_certificate_buffer
  390. #define CyaSSL_CTX_use_NTRUPrivateKey_file wolfSSL_CTX_use_NTRUPrivateKey_file
  391. #define CyaSSL_use_certificate_chain_buffer wolfSSL_use_certificate_chain_buffer
  392. #define CyaSSL_CTX_der_load_verify_locations \
  393. wolfSSL_CTX_der_load_verify_locations
  394. #define CyaSSL_CTX_use_certificate_chain_file \
  395. wolfSSL_CTX_use_certificate_chain_file
  396. #define CyaSSL_CTX_use_certificate_chain_buffer \
  397. wolfSSL_CTX_use_certificate_chain_buffer
  398. /* Context and Session Setup*/
  399. #define CyaSSL_new wolfSSL_new
  400. #define CyaSSL_free wolfSSL_free
  401. #define CyaSSL_set_fd wolfSSL_set_fd
  402. #define CyaSSL_CTX_new wolfSSL_CTX_new
  403. #define CyaSSL_CTX_free wolfSSL_CTX_free
  404. #define CyaSSL_SetVersion wolfSSL_SetVersion
  405. #define CyaSSL_set_verify wolfSSL_set_verify
  406. #define CyaSSL_set_session wolfSSL_set_session
  407. #define CyaSSL_set_timeout wolfSSL_set_timeout
  408. #define CyaSSL_CTX_set_verify wolfSSL_CTX_set_verify
  409. #define CyaSSL_CTX_set_timeout wolfSSL_CTX_set_timeout
  410. #define CyaSSL_set_cipher_list wolfSSL_set_cipher_list
  411. #define CyaSSL_set_compression wolfSSL_set_compression
  412. #define CyaTLSv1_client_method wolfTLSv1_client_method
  413. #define CyaTLSv1_server_method wolfTLSv1_server_method
  414. #define CyaSSLv3_client_method wolfSSLv3_client_method
  415. #define CyaSSLv3_server_method wolfSSLv3_server_method
  416. #define CyaSSLv23_client_method wolfSSLv23_client_method
  417. #define CyaSSLv23_server_method wolfSSLv23_server_method
  418. #define CyaDTLSv1_client_method wolfDTLSv1_client_method
  419. #define CyaDTLSv1_server_method wolfDTLSv1_server_method
  420. #define CyaSSL_check_domain_name wolfSSL_check_domain_name
  421. #define CyaTLSv1_1_client_method wolfTLSv1_1_client_method
  422. #define CyaTLSv1_1_server_method wolfTLSv1_1_server_method
  423. #define CyaTLSv1_2_client_method wolfTLSv1_2_client_method
  424. #define CyaTLSv1_2_server_method wolfTLSv1_2_server_method
  425. #define CyaDTLSv1_2_client_method wolfDTLSv1_2_client_method
  426. #define CyaDTLSv1_2_server_method wolfDTLSv1_2_server_method
  427. #define CyaSSL_set_group_messages wolfSSL_set_group_messages
  428. #define CyaSSL_set_using_nonblock wolfSSL_set_using_nonblock
  429. #define CyaSSL_CTX_set_cipher_list wolfSSL_CTX_set_cipher_list
  430. #define CyaSSL_CTX_set_group_messages wolfSSL_CTX_set_group_messages
  431. #define CyaSSL_CTX_set_session_cache_mode wolfSSL_CTX_set_session_cache_mode
  432. /* Callbacks */
  433. /*
  434. * Empty commment denotes not listed in CyaSSL Manual
  435. * (soon to be wolfSSL Manual)
  436. */
  437. #define CyaSSL_accept_ex wolfSSL_accept_ex
  438. #define CyaSSL_SetIORecv wolfSSL_SetIORecv
  439. #define CyaSSL_SetIOSend wolfSSL_SetIOSend
  440. #define CyaSSL_connect_ex wolfSSL_connect_ex
  441. #define CyaSSL_CTX_SetCACb wolfSSL_CTX_SetCACb
  442. #define CyaSSL_SetIOReadCtx wolfSSL_SetIOReadCtx
  443. #define CyaSSL_SetRsaEncCtx wolfSSL_SetRsaEncCtx
  444. #define CyaSSL_GetRsaEncCtx wolfSSL_GetRsaEncCtx
  445. #define CyaSSL_SetRsaDecCtx wolfSSL_SetRsaDecCtx
  446. #define CyaSSL_GetRsaDecCtx wolfSSL_GetRsaDecCtx
  447. #define CyaSSL_SetLoggingCb wolfSSL_SetLoggingCb
  448. #define CyaSSL_SetEccSignCtx wolfSSL_SetEccSignCtx
  449. #define CyaSSL_GetEccSignCtx wolfSSL_GetEccSignCtx
  450. #define CyaSSL_SetRsaSignCtx wolfSSL_SetRsaSignCtx
  451. #define CyaSSL_GetRsaSignCtx wolfSSL_GetRsaSignCtx
  452. #define CyaSSL_SetIOWriteCtx wolfSSL_SetIOWriteCtx
  453. #define CyaSSL_SetIOReadFlags wolfSSL_SetIOReadFlags
  454. #define CyaSSL_SetEccVerifyCtx wolfSSL_SetEccVerifyCtx
  455. #define CyaSSL_GetEccVerifyCtx wolfSSL_GetEccVerifyCtx
  456. #define CyaSSL_SetRsaVerifyCtx wolfSSL_SetRsaVerifyCtx
  457. #define CyaSSL_GetRsaVerifyCtx wolfSSL_GetRsaVerifyCtx
  458. #define CyaSSL_CTX_SetRsaEncCb wolfSSL_CTX_SetRsaEncCb
  459. #define CyaSSL_CTX_SetRsaDecCb wolfSSL_CTX_SetRsaDecCb
  460. #define CyaSSL_SetIOWriteFlags wolfSSL_SetIOWriteFlags
  461. #define CyaSSL_SetTlsHmacInner wolfSSL_SetTlsHmacInner
  462. #define CyaSSL_SetMacEncryptCtx wolfSSL_SetMacEncryptCtx
  463. #define CyaSSL_GetMacEncryptCtx wolfSSL_GetMacEncryptCtx
  464. #define CyaSSL_CTX_SetEccSignCb wolfSSL_CTX_SetEccSignCb
  465. #define CyaSSL_CTX_SetRsaSignCb wolfSSL_CTX_SetRsaSignCb
  466. #define CyaSSL_CTX_SetEccVerifyCb wolfSSL_CTX_SetEccVerifyCb
  467. #define CyaSSL_CTX_SetRsaVerifyCb wolfSSL_CTX_SetRsaVerifyCb
  468. #define CyaSSL_CTX_SetMacEncryptCb wolfSSL_CTX_SetMacEncryptCb
  469. #define CyaSSL_SetDecryptVerifyCtx wolfSSL_SetDecryptVerifyCtx
  470. #define CyaSSL_GetDecryptVerifyCtx wolfSSL_GetDecryptVerifyCtx
  471. #define CyaSSL_CTX_SetDecryptVerifyCb wolfSSL_CTX_SetDecryptVerifyCb
  472. #define CyaSSL_CTX_use_psk_identity_hint wolfSSL_CTX_use_psk_identity_hint /**/
  473. #define CyaSSL_CTX_set_psk_client_callback \
  474. wolfSSL_CTX_set_psk_client_callback /**/
  475. #define CyaSSL_CTX_set_psk_server_callback \
  476. wolfSSL_CTX_set_psk_server_callback /**/
  477. /* Anonymous */
  478. #define CyaSSL_CTX_allow_anon_cipher wolfSSL_CTX_allow_anon_cipher /**/
  479. /* Error Handling and Debugging*/
  480. #define CyaSSL_get_error wolfSSL_get_error
  481. #define CyaSSL_want_read wolfSSL_want_read
  482. #define CyaSSL_want_write wolfSSL_want_write
  483. #define CyaSSL_Debugging_ON wolfSSL_Debugging_ON
  484. #define CyaSSL_Debugging_OFF wolfSSL_Debugging_OFF
  485. #define CyaSSL_ERR_error_string wolfSSL_ERR_error_string
  486. #define CyaSSL_load_error_strings wolfSSL_load_error_strings
  487. #define CyaSSL_ERR_error_string_n wolfSSL_ERR_error_string_n
  488. #define CyaSSL_ERR_print_errors_fp wolfSSL_ERR_print_errors_fp
  489. /* OCSP and CRL */
  490. /*
  491. * Empty commment denotes not listed in CyaSSL Manual
  492. * (soon to be wolfSSL Manual)
  493. */
  494. #define CYASSL_CRL_MONITOR WOLFSSL_CRL_MONITOR /**/
  495. #define CYASSL_CRL_START_MON WOLFSSL_CRL_START_MON /**/
  496. #define CYASSL_OCSP_NO_NONCE WOLFSSL_OCSP_NO_NONCE /**/
  497. #define CYASSL_OCSP_URL_OVERRIDE WOLFSSL_OCSP_URL_OVERRIDE
  498. #define CyaSSL_CTX_EnableOCSP wolfSSL_CTX_EnableOCSP
  499. #define CyaSSL_CTX_OCSP_set_options wolfSSL_CTX_OCSP_set_options /**/
  500. #define CyaSSL_CTX_SetOCSP_OverrideURL wolfSSL_CTX_SetOCSP_OverrideURL /**/
  501. #define CyaSSL_CTX_OCSP_set_override_url wolfSSL_CTX_OCSP_set_override_url /**/
  502. /* Informational */
  503. #define CyaSSL_GetSide wolfSSL_GetSide
  504. #define CyaSSL_IsTLSv1_1 wolfSSL_IsTLSv1_1
  505. #define CyaSSL_GetKeySize wolfSSL_GetKeySize
  506. #define CyaSSL_GetHmacSize wolfSSL_GetHmacSize
  507. #define CyaSSL_GetHmacType wolfSSL_GetHmacType
  508. #define CyaSSL_GetMacSecret wolfSSL_GetMacSecret
  509. #define CyaSSL_GetObjectSize wolfSSL_GetObjectSize
  510. #define CyaSSL_GetBulkCipher wolfSSL_GetBulkCipher
  511. #define CyaSSL_GetCipherType wolfSSL_GetCipherType
  512. #define CyaSSL_GetAeadMacSize wolfSSL_GetAeadMacSize
  513. #define CyaSSL_GetClientWriteIV wolfSSL_GetClientWriteIV
  514. #define CyaSSL_GetServerWriteIV wolfSSL_GetServerWriteIV
  515. #define CyaSSL_GetClientWriteKey wolfSSL_GetClientWriteKey
  516. #define CyaSSL_GetServerWriteKey wolfSSL_GetServerWriteKey
  517. #define CyaSSL_GetCipherBlockSize wolfSSL_GetCipherBlockSize
  518. /* Connection, Session, and I/O */
  519. #define CyaSSL_peek wolfSSL_peek
  520. #define CyaSSL_read wolfSSL_read
  521. #define CyaSSL_recv wolfSSL_recv
  522. #define CyaSSL_send wolfSSL_send
  523. #define CyaSSL_write wolfSSL_write
  524. #define CyaSSL_writev wolfSSL_writev
  525. #define CyaSSL_accept wolfSSL_accept
  526. #define CyaSSL_get_fd wolfSSL_get_fd
  527. #define CyaSSL_connect wolfSSL_connect
  528. #define CyaSSL_pending wolfSSL_pending
  529. #define CyaSSL_negotiate wolfSSL_negotiate
  530. #define CyaSSL_get_session wolfSSL_get_session
  531. #define CyaSSL_connect_cert wolfSSL_connect_cert
  532. #define CyaSSL_flush_sessions wolfSSL_flush_sessions
  533. #define CyaSSL_get_using_nonblock wolfSSL_get_using_nonblock
  534. /* DTLS Specific */
  535. #define CyaSSL_dtls wolfSSL_dtls
  536. #define CyaSSL_dtls_set_peer wolfSSL_dtls_set_peer
  537. #define CyaSSL_dtls_get_peer wolfSSL_dtls_get_peer
  538. #define CyaSSL_dtls_got_timeout wolfSSL_dtls_got_timeout
  539. #define CyaSSL_dtls_get_current_timeout wolfSSL_dtls_get_current_timeout
  540. /* Certificate Manager */
  541. #define CyaSSL_CertManagerNew wolfSSL_CertManagerNew
  542. #define CyaSSL_CertManagerFree wolfSSL_CertManagerFree
  543. #define CyaSSL_CertManagerLoadCA wolfSSL_CertManagerLoadCA
  544. #define CyaSSL_CertManagerVerify wolfSSL_CertManagerVerify
  545. #define CyaSSL_CertManagerEnableCRL wolfSSL_CertManagerEnableCRL
  546. #define CyaSSL_CertManagerDisableCRL wolfSSL_CertManagerDisableCRL
  547. #define CyaSSL_CertManagerVerifyBuffer wolfSSL_CertManagerVerifyBuffer
  548. #ifndef NO_CERTS
  549. #define CyaSSL_CertManagerCheckCRL wolfSSL_CertManagerCheckCRL
  550. #define CyaSSL_CertManagerLoadCRL wolfSSL_CertManagerLoadCRL
  551. #define CyaSSL_CertManagerSetCRL_Cb wolfSSL_CertManagerSetCRL_Cb
  552. #define CyaSSL_CertManagerCheckOCSP wolfSSL_CertManagerCheckOCSP
  553. #define CyaSSL_CertManagerSetOCSP_Cb wolfSSL_CertManagerSetOCSP_Cb
  554. #define CyaSSL_CertManagerSetOCSPOverrideURL wolfSSL_CertManagerSetOCSPOverrideURL
  555. #define CyaSSL_DisableCRL wolfSSL_DisableCRL
  556. #define CyaSSL_EnableOCSP wolfSSL_EnableOCSP
  557. #define CyaSSL_DisableOCSP wolfSSL_DisableOCSP
  558. #define CyaSSL_SetOCSP_OverrideURL wolfSSL_SetOCSP_OverrideURL
  559. #define CyaSSL_SetOCSP_Cb wolfSSL_SetOCSP_Cb
  560. #define CyaSSL_CTX_EnableCRL wolfSSL_CTX_EnableCRL
  561. #define CyaSSL_CTX_DisableCRL wolfSSL_CTX_DisableCRL
  562. #define CyaSSL_CTX_LoadCRL wolfSSL_CTX_LoadCRL
  563. #define CyaSSL_CTX_SetCRL_Cb wolfSSL_CTX_SetCRL_Cb
  564. #define CyaSSL_CTX_DisableOCSP wolfSSL_CTX_DisableOCSP
  565. #define CyaSSL_CTX_SetOCSP_Cb wolfSSL_CTX_SetOCSP_Cb
  566. #endif /* !NO_CERTS */
  567. /* OpenSSL Compatibility Layer */
  568. #define CyaSSL_PemCertToDer wolfSSL_PemCertToDer
  569. #define CyaSSL_get_sessionID wolfSSL_get_sessionID
  570. #define CyaSSL_get_peer_count wolfSSL_get_peer_count
  571. #define CyaSSL_get_chain_cert wolfSSL_get_chain_cert
  572. #define CyaSSL_get_peer_chain wolfSSL_get_peer_chain
  573. #define CyaSSL_get_peer_length wolfSSL_get_peer_length
  574. #define CyaSSL_get_chain_cert_pem wolfSSL_get_chain_cert_pem
  575. #define CyaSSL_use_PrivateKey_file wolfSSL_use_PrivateKey_file
  576. #define CyaSSL_use_certificate_file wolfSSL_use_certificate_file
  577. #define CyaSSL_use_RSAPrivateKey_file wolfSSL_use_RSAPrivateKey_file
  578. #define CyaSSL_X509_get_serial_number wolfSSL_X509_get_serial_number
  579. #define CyaSSL_CTX_use_RSAPrivateKey_file wolfSSL_CTX_use_RSAPrivateKey_file
  580. #define CyaSSL_use_certificate_chain_file wolfSSL_use_certificate_chain_file
  581. /* TLS Extensions */
  582. #define CYASSL_SNI_HOST_NAME WOLFSSL_SNI_HOST_NAME
  583. #define CyaSSL_UseSNI wolfSSL_UseSNI
  584. #define CyaSSL_CTX_UseSNI wolfSSL_CTX_UseSNI
  585. #define CyaSSL_SNI_SetOptions wolfSSL_SNI_SetOptions
  586. #define CyaSSL_SNI_GetRequest wolfSSL_SNI_GetRequest
  587. #define CyaSSL_UseMaxFragment wolfSSL_UseMaxFragment
  588. #define CyaSSL_UseTruncatedHMAC wolfSSL_UseTruncatedHMAC
  589. #define CyaSSL_UseSupportedCurve wolfSSL_UseSupportedCurve
  590. #define CyaSSL_SNI_GetFromBuffer wolfSSL_SNI_GetFromBuffer
  591. #define CyaSSL_CTX_SNI_SetOptions wolfSSL_CTX_SNI_SetOptions
  592. #define CyaSSL_CTX_UseMaxFragment wolfSSL_CTX_UseMaxFragment
  593. #define CyaSSL_CTX_UseTruncatedHMAC wolfSSL_CTX_UseTruncatedHMAC
  594. #define CyaSSL_CTX_UseSupportedCurve wolfSSL_CTX_UseSupportedCurve
  595. /* End wolfssl -> cyassl -> openssl compatibility */
  596. /* JRB macro redefinitions and api calls for cryptography for reverse compat. */
  597. #ifdef WOLFSSL_SMALL_STACK
  598. #define CYASSL_SMALL_STACK
  599. #endif
  600. /*
  601. * wrapper around macros until they are changed in cyassl code
  602. * needs investigation in regards to macros in fips
  603. */
  604. #define NO_WOLFSSL_ALLOC_ALIGN NO_CYASSL_ALLOC_ALIGN /* @TODO */
  605. /* examples/client/client.h */
  606. #define CYASSL_THREAD WOLFSSL_THREAD
  607. #ifdef WOLFSSL_DTLS
  608. #define CYASSL_DTLS WOLFSSL_DTLS
  609. #endif
  610. /* examples/client/client.c */
  611. #define LIBCYASSL_VERSION_STRING LIBWOLFSSL_VERSION_STRING
  612. #ifdef __cplusplus
  613. } /* extern "C" */
  614. #endif
  615. #endif /* CyaSSL_openssl_h__ */