ssl.h 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722
  1. /* ssl.h
  2. *
  3. * Copyright (C) 2006-2022 wolfSSL Inc.
  4. *
  5. * This file is part of wolfSSL.
  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. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
  20. */
  21. /*
  22. * ssl.h makes wolfssl backwards compatible 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_get_notBefore wolfSSL_X509_get_notBefore
  152. #define CyaSSL_X509_get_notAfter wolfSSL_X509_get_notAfter
  153. #define CyaSSL_X509_version wolfSSL_X509_version
  154. #define CyaSSL_cmp_peer_cert_to_file wolfSSL_cmp_peer_cert_to_file
  155. #define CyaSSL_X509_get_next_altname wolfSSL_X509_get_next_altname
  156. #define CyaSSL_X509_d2i wolfSSL_X509_d2i
  157. #ifndef NO_FILESYSTEM
  158. #ifndef NO_STDIO_FILESYSTEM
  159. #define CyaSSL_X509_d2i_fp wolfSSL_X509_d2i_fp
  160. #endif
  161. #define CyaSSL_X509_load_certificate_file wolfSSL_X509_load_certificate_file
  162. #endif
  163. #ifdef WOLFSSL_SEP
  164. #define CyaSSL_X509_get_device_type wolfSSL_X509_get_device_type
  165. #define CyaSSL_X509_get_hw_type wolfSSL_X509_get_hw_type
  166. #define CyaSSL_X509_get_hw_serial_number wolfSSL_X509_get_hw_serial_number
  167. #endif
  168. #define CyaSSL_CTX_SetGenCookie wolfSSL_CTX_SetGenCookie
  169. #define CyaSSL_SetCookieCtx wolfSSL_SetCookieCtx
  170. #define CyaSSL_GetCookieCtx wolfSSL_GetCookieCtx
  171. #define CyaSSL_ERR_get_error_line_data wolfSSL_ERR_get_error_line_data
  172. #define CyaSSL_ERR_get_error wolfSSL_ERR_get_error
  173. #define CyaSSL_ERR_clear_error wolfSSL_ERR_clear_error
  174. #define CyaSSL_RAND_status wolfSSL_RAND_status
  175. #define CyaSSL_RAND_bytes wolfSSL_RAND_bytes
  176. #define CyaSSL_CTX_set_options wolfSSL_CTX_set_options
  177. #define CyaSSL_ERR_free_strings wolfSSL_ERR_free_strings
  178. #define CyaSSL_ERR_remove_state wolfSSL_ERR_remove_state
  179. #define CyaSSL_EVP_cleanup wolfSSL_EVP_cleanup
  180. #define CyaSSL_cleanup_all_ex_data wolfSSL_cleanup_all_ex_data
  181. #define CyaSSL_CTX_set_mode wolfSSL_CTX_set_mode
  182. #define CyaSSL_CTX_get_mode wolfSSL_CTX_get_mode
  183. #define CyaSSL_CTX_set_default_read_ahead wolfSSL_CTX_set_default_read_ahead
  184. #define CyaSSL_CTX_sess_set_cache_size wolfSSL_CTX_sess_set_cache_size
  185. #define CyaSSL_CTX_set_default_verify_paths wolfSSL_CTX_set_default_verify_paths
  186. #define CyaSSL_CTX_set_session_id_context wolfSSL_CTX_set_session_id_context
  187. #define CyaSSL_get_peer_certificate wolfSSL_get_peer_certificate
  188. #define CyaSSL_BIO_printf wolfSSL_BIO_printf
  189. #define CyaSSL_ASN1_UTCTIME_print wolfSSL_ASN1_UTCTIME_print
  190. #define CyaSSL_sk_num wolfSSL_sk_num
  191. #define CyaSSL_sk_value wolfSSL_sk_value
  192. /* stunnel 4.28 needs */
  193. #define CyaSSL_CTX_get_ex_data wolfSSL_CTX_get_ex_data
  194. #define CyaSSL_CTX_set_ex_data wolfSSL_CTX_set_ex_data
  195. #define CyaSSL_CTX_sess_set_get_cb wolfSSL_CTX_sess_set_get_cb
  196. #define CyaSSL_CTX_sess_set_new_cb wolfSSL_CTX_sess_set_new_cb
  197. #define CyaSSL_CTX_sess_set_remove_cb wolfSSL_CTX_sess_set_remove_cb
  198. #define CyaSSL_i2d_SSL_SESSION wolfSSL_i2d_SSL_SESSION
  199. #define CyaSSL_d2i_SSL_SESSION wolfSSL_d2i_SSL_SESSION
  200. #define CyaSSL_SESSION_get_timeout wolfSSL_SESSION_get_timeout
  201. #define CyaSSL_SESSION_get_time wolfSSL_SESSION_get_time
  202. #define CyaSSL_CTX_get_ex_new_index wolfSSL_CTX_get_ex_new_index
  203. /* wolfio.c */
  204. #define CYASSL_CBIO_ERR_ISR WOLFSSL_CBIO_ERR_ISR
  205. #define CYASSL_CBIO_ERR_TIMEOUT WOLFSSL_CBIO_ERR_TIMEOUT
  206. #define CYASSL_CBIO_ERR_GENERAL WOLFSSL_CBIO_ERR_GENERAL
  207. #define CYASSL_CBIO_ERR_CONN_RST WOLFSSL_CBIO_ERR_CONN_RST
  208. #define CYASSL_CBIO_ERR_WANT_READ WOLFSSL_CBIO_ERR_WANT_READ
  209. #define CYASSL_CBIO_ERR_WANT_WRITE WOLFSSL_CBIO_ERR_WANT_WRITE
  210. #define CYASSL_CBIO_ERR_CONN_CLOSE WOLFSSL_CBIO_ERR_CONN_CLOSE
  211. #define CyaSSL_GetIOReadCtx wolfSSL_GetIOReadCtx
  212. #define CyaSSL_GetIOWriteCtx wolfSSL_GetIOWriteCtx
  213. /* src/tls.c */
  214. #define CYASSL_SERVER_END WOLFSSL_SERVER_END
  215. #define CYASSL_TLS_HMAC_INNER_SZ WOLFSSL_TLS_HMAC_INNER_SZ
  216. #define CyaSSL_DeriveTlsKeys wolfSSL_DeriveTlsKeys
  217. #define CyaSSL_make_eap_keys wolfSSL_make_eap_keys
  218. #define CyaSSL_MakeTlsMasterSecret wolfSSL_MakeTlsMasterSecret
  219. /* src/internal.c */
  220. #define CYASSL_CHAIN_CA WOLFSSL_CHAIN_CA
  221. #define CYASSL_ALERT_HISTORY WOLFSSL_ALERT_HISTORY
  222. #define CYASSL_SESSION_TIMEOUT WOLFSSL_SESSION_TIMEOUT
  223. #define CYASSL_CBIO_ERR_CONN_RST WOLFSSL_CBIO_ERR_CONN_RST
  224. #define cyassl_rc4 wolfssl_rc4
  225. #define cyassl_aes wolfssl_aes
  226. #define cyassl_chacha wolfssl_chacha
  227. #define CyaSSL_ERR_reason_error_string wolfSSL_ERR_reason_error_string
  228. #define CyaSSL_set_ex_data wolfSSL_set_ex_data
  229. #define CyaSSL_get_shutdown wolfSSL_get_shutdown
  230. #define CyaSSL_set_rfd wolfSSL_set_rfd
  231. #define CyaSSL_set_wfd wolfSSL_set_wfd
  232. #define CyaSSL_set_shutdown wolfSSL_set_shutdown
  233. #define CyaSSL_set_session_id_context wolfSSL_set_session_id_context
  234. #define CyaSSL_set_connect_state wolfSSL_set_connect_state
  235. #define CyaSSL_set_accept_state wolfSSL_set_accept_state
  236. #define CyaSSL_session_reused wolfSSL_session_reused
  237. #define CyaSSL_SESSION_free wolfSSL_SESSION_free
  238. #define CyaSSL_is_init_finished wolfSSL_is_init_finished
  239. #define CyaSSL_get_version wolfSSL_get_version
  240. #define CyaSSL_get_current_cipher_suite wolfSSL_get_current_cipher_suite
  241. #define CyaSSL_get_current_cipher wolfSSL_get_current_cipher
  242. #define CyaSSL_CIPHER_description wolfSSL_CIPHER_description
  243. #define CyaSSL_CIPHER_get_name wolfSSL_CIPHER_get_name
  244. #define CyaSSL_get_cipher wolfSSL_get_cipher
  245. #define CyaSSL_get1_session wolfSSL_get1_session
  246. #define CyaSSL_X509_free wolfSSL_X509_free
  247. #define CyaSSL_OPENSSL_free wolfSSL_OPENSSL_free
  248. #define CyaSSL_OCSP_parse_url wolfSSL_OCSP_parse_url
  249. #define CyaSSLv23_client_method wolfSSLv23_client_method
  250. #define CyaSSLv2_client_method wolfSSLv2_client_method
  251. #define CyaSSLv2_server_method wolfSSLv2_server_method
  252. #define CyaSSL_MD4_Init wolfSSL_MD4_Init
  253. #define CyaSSL_MD4_Update wolfSSL_MD4_Update
  254. #define CyaSSL_MD4_Final wolfSSL_MD4_Final
  255. #define CyaSSL_BIO_new wolfSSL_BIO_new
  256. #define CyaSSL_BIO_free wolfSSL_BIO_free
  257. #define CyaSSL_BIO_free_all wolfSSL_BIO_free_all
  258. #define CyaSSL_BIO_read wolfSSL_BIO_read
  259. #define CyaSSL_BIO_write wolfSSL_BIO_write
  260. #define CyaSSL_BIO_push wolfSSL_BIO_push
  261. #define CyaSSL_BIO_pop wolfSSL_BIO_pop
  262. #define CyaSSL_BIO_flush wolfSSL_BIO_flush
  263. #define CyaSSL_BIO_pending wolfSSL_BIO_pending
  264. #define CyaSSL_BIO_f_buffer wolfSSL_BIO_f_buffer
  265. #define CyaSSL_BIO_set_write_buffer_size wolfSSL_BIO_set_write_buffer_size
  266. #define CyaSSL_BIO_f_ssl wolfSSL_BIO_f_ssl
  267. #define CyaSSL_BIO_new_socket wolfSSL_BIO_new_socket
  268. #define CyaSSL_BIO_eof wolfSSL_BIO_eof
  269. #define CyaSSL_BIO_s_mem wolfSSL_BIO_s_mem
  270. #define CyaSSL_BIO_f_base64 wolfSSL_BIO_f_base64
  271. #define CyaSSL_BIO_set_flags wolfSSL_BIO_set_flags
  272. #define CyaSSL_BIO_get_mem_data wolfSSL_BIO_get_mem_data
  273. #define CyaSSL_BIO_new_mem_buf wolfSSL_BIO_new_mem_buf
  274. #define CyaSSL_BIO_set_ssl wolfSSL_BIO_set_ssl
  275. #define CyaSSL_set_bio wolfSSL_set_bio
  276. #define CyaSSL_add_all_algorithms wolfSSL_add_all_algorithms
  277. #define CyaSSL_RAND_screen wolfSSL_RAND_screen
  278. #define CyaSSL_RAND_file_name wolfSSL_RAND_file_name
  279. #define CyaSSL_RAND_write_file wolfSSL_RAND_write_file
  280. #define CyaSSL_RAND_load_file wolfSSL_RAND_load_file
  281. #define CyaSSL_RAND_egd wolfSSL_RAND_egd
  282. #define CyaSSL_RAND_seed wolfSSL_RAND_seed
  283. #define CyaSSL_RAND_add wolfSSL_RAND_add
  284. #define CyaSSL_COMP_zlib wolfSSL_COMP_zlib
  285. #define CyaSSL_COMP_rle wolfSSL_COMP_rle
  286. #define CyaSSL_COMP_add_compression_method wolfSSL_COMP_add_compression_method
  287. #define CyaSSL_set_dynlock_create_callback wolfSSL_set_dynlock_create_callback
  288. #define CyaSSL_set_dynlock_lock_callback wolfSSL_set_dynlock_lock_callback
  289. #define CyaSSL_set_dynlock_destroy_callback wolfSSL_set_dynlock_destroy_callback
  290. #define CyaSSL_get_ex_new_index wolfSSL_get_ex_new_index
  291. #define CyaSSL_set_id_callback wolfSSL_set_id_callback
  292. #define CyaSSL_set_locking_callback wolfSSL_set_locking_callback
  293. #define CyaSSL_num_locks wolfSSL_num_locks
  294. #define CyaSSL_X509_STORE_CTX_get_current_cert wolfSSL_X509_STORE_CTX_get_current_cert
  295. #define CyaSSL_X509_STORE_CTX_get_error wolfSSL_X509_STORE_CTX_get_error
  296. #define CyaSSL_X509_STORE_CTX_get_error_depth wolfSSL_X509_STORE_CTX_get_error_depth
  297. #define CyaSSL_X509_NAME_oneline wolfSSL_X509_NAME_oneline
  298. #define CyaSSL_X509_get_issuer_name wolfSSL_X509_get_issuer_name
  299. #define CyaSSL_X509_get_subject_name wolfSSL_X509_get_subject_name
  300. #define CyaSSL_X509_ext_isSet_by_NID wolfSSL_X509_ext_isSet_by_NID
  301. #define CyaSSL_X509_ext_get_critical_by_NID wolfSSL_X509_ext_get_critical_by_NID
  302. #define CyaSSL_X509_get_isCA wolfSSL_X509_get_isCA
  303. #define CyaSSL_X509_get_isSet_pathLength wolfSSL_X509_get_isSet_pathLength
  304. #define CyaSSL_X509_get_pathLength wolfSSL_X509_get_pathLength
  305. #define CyaSSL_X509_get_keyUsage wolfSSL_X509_get_keyUsage
  306. #define CyaSSL_X509_get_authorityKeyID wolfSSL_X509_get_authorityKeyID
  307. #define CyaSSL_X509_get_subjectKeyID wolfSSL_X509_get_subjectKeyID
  308. #define CyaSSL_X509_NAME_entry_count wolfSSL_X509_NAME_entry_count
  309. #define CyaSSL_X509_NAME_get_text_by_NID wolfSSL_X509_NAME_get_text_by_NID
  310. #define CyaSSL_X509_verify_cert wolfSSL_X509_verify_cert
  311. #define CyaSSL_X509_verify_cert_error_string wolfSSL_X509_verify_cert_error_string
  312. #define CyaSSL_X509_get_signature_type wolfSSL_X509_get_signature_type
  313. #define CyaSSL_X509_get_signature wolfSSL_X509_get_signature
  314. #define CyaSSL_X509_LOOKUP_add_dir wolfSSL_X509_LOOKUP_add_dir
  315. #define CyaSSL_X509_LOOKUP_load_file wolfSSL_X509_LOOKUP_load_file
  316. #define CyaSSL_X509_LOOKUP_hash_dir wolfSSL_X509_LOOKUP_hash_dir
  317. #define CyaSSL_X509_LOOKUP_file wolfSSL_X509_LOOKUP_file
  318. #define CyaSSL_X509_STORE_add_lookup wolfSSL_X509_STORE_add_lookup
  319. #define CyaSSL_X509_STORE_new wolfSSL_X509_STORE_new
  320. #define CyaSSL_X509_STORE_free wolfSSL_X509_STORE_free
  321. #define CyaSSL_X509_STORE_add_cert wolfSSL_X509_STORE_add_cert
  322. #define CyaSSL_X509_STORE_set_default_paths wolfSSL_X509_STORE_set_default_paths
  323. #define CyaSSL_X509_STORE_get_by_subject wolfSSL_X509_STORE_get_by_subject
  324. #define CyaSSL_X509_STORE_CTX_new wolfSSL_X509_STORE_CTX_new
  325. #define CyaSSL_X509_STORE_CTX_init wolfSSL_X509_STORE_CTX_init
  326. #define CyaSSL_X509_STORE_CTX_free wolfSSL_X509_STORE_CTX_free
  327. #define CyaSSL_X509_STORE_CTX_cleanup wolfSSL_X509_STORE_CTX_cleanup
  328. #define CyaSSL_X509_CRL_get_lastUpdate wolfSSL_X509_CRL_get_lastUpdate
  329. #define CyaSSL_X509_CRL_get_nextUpdate wolfSSL_X509_CRL_get_nextUpdate
  330. #define CyaSSL_X509_get_pubkey wolfSSL_X509_get_pubkey
  331. #define CyaSSL_X509_CRL_verify wolfSSL_X509_CRL_verify
  332. #define CyaSSL_X509_STORE_CTX_set_error wolfSSL_X509_STORE_CTX_set_error
  333. #define CyaSSL_X509_OBJECT_free_contents wolfSSL_X509_OBJECT_free_contents
  334. #define CyaSSL_EVP_PKEY_free wolfSSL_EVP_PKEY_free
  335. #define CyaSSL_X509_cmp_current_time wolfSSL_X509_cmp_current_time
  336. #define CyaSSL_sk_X509_REVOKED_num wolfSSL_sk_X509_REVOKED_num
  337. #define CyaSSL_X509_CRL_get_REVOKED wolfSSL_X509_CRL_get_REVOKED
  338. #define CyaSSL_sk_X509_REVOKED_value wolfSSL_sk_X509_REVOKED_value
  339. #define CyaSSL_X509_get_serialNumber wolfSSL_X509_get_serialNumber
  340. #define CyaSSL_ASN1_TIME_print wolfSSL_ASN1_TIME_print
  341. #define CyaSSL_ASN1_INTEGER_cmp wolfSSL_ASN1_INTEGER_cmp
  342. #define CyaSSL_ASN1_INTEGER_get wolfSSL_ASN1_INTEGER_get
  343. #define CyaSSL_load_client_CA_file wolfSSL_load_client_CA_file
  344. #define CyaSSL_CTX_set_client_CA_list wolfSSL_CTX_set_client_CA_list
  345. #define CyaSSL_X509_STORE_CTX_get_ex_data wolfSSL_X509_STORE_CTX_get_ex_data
  346. #define CyaSSL_get_ex_data_X509_STORE_CTX_idx wolfSSL_get_ex_data_X509_STORE_CTX_idx
  347. #define CyaSSL_get_ex_data wolfSSL_get_ex_data
  348. #define CyaSSL_CTX_set_default_passwd_cb_userdata wolfSSL_CTX_set_default_passwd_cb_userdata
  349. #define CyaSSL_CTX_set_default_passwd_cb wolfSSL_CTX_set_default_passwd_cb
  350. #define CyaSSL_CTX_set_info_callback wolfSSL_CTX_set_info_callback
  351. #define CyaSSL_ERR_peek_error wolfSSL_ERR_peek_error
  352. #define CyaSSL_GET_REASON wolfSSL_GET_REASON
  353. #define CyaSSL_alert_type_string_long wolfSSL_alert_type_string_long
  354. #define CyaSSL_alert_desc_string_long wolfSSL_alert_desc_string_long
  355. #define CyaSSL_state_string_long wolfSSL_state_string_long
  356. #define CyaSSL_RSA_generate_key wolfSSL_RSA_generate_key
  357. #define CyaSSL_CTX_set_tmp_rsa_callback wolfSSL_CTX_set_tmp_rsa_callback
  358. #define CyaSSL_PEM_def_callback wolfSSL_PEM_def_callback
  359. #define CyaSSL_CTX_sess_accept wolfSSL_CTX_sess_accept
  360. #define CyaSSL_CTX_sess_connect wolfSSL_CTX_sess_connect
  361. #define CyaSSL_CTX_sess_accept_good wolfSSL_CTX_sess_accept_good
  362. #define CyaSSL_CTX_sess_connect_good wolfSSL_CTX_sess_connect_good
  363. #define CyaSSL_CTX_sess_accept_renegotiate wolfSSL_CTX_sess_accept_renegotiate
  364. #define CyaSSL_CTX_sess_connect_renegotiate wolfSSL_CTX_sess_connect_renegotiate
  365. #define CyaSSL_CTX_sess_hits wolfSSL_CTX_sess_hits
  366. #define CyaSSL_CTX_sess_cb_hits wolfSSL_CTX_sess_cb_hits
  367. #define CyaSSL_CTX_sess_cache_full wolfSSL_CTX_sess_cache_full
  368. #define CyaSSL_CTX_sess_misses wolfSSL_CTX_sess_misses
  369. #define CyaSSL_CTX_sess_timeouts wolfSSL_CTX_sess_timeouts
  370. #define CyaSSL_CTX_sess_number wolfSSL_CTX_sess_number
  371. #define CyaSSL_CTX_sess_get_cache_size wolfSSL_CTX_sess_get_cache_size
  372. /* src/keys.c */
  373. #define cyassl_triple_des wolfssl_triple_des
  374. /* Initialization and Shutdown */
  375. #define CyaSSL_Init wolfSSL_Init
  376. #define CyaSSL_library_init wolfSSL_library_init
  377. #define CyaSSL_Cleanup wolfSSL_Cleanup
  378. #define CyaSSL_shutdown wolfSSL_shutdown
  379. /* Certs and keys */
  380. #define CyaSSL_SetTmpDH wolfSSL_SetTmpDH
  381. #define CyaSSL_KeepArrays wolfSSL_KeepArrays
  382. #define CyaSSL_FreeArrays wolfSSL_FreeArrays
  383. #define CyaSSL_SetTmpDH_file wolfSSL_SetTmpDH_file
  384. #define CyaSSL_use_PrivateKey_buffer wolfSSL_use_PrivateKey_buffer
  385. #define CyaSSL_use_certificate_buffer wolfSSL_use_certificate_buffer
  386. #define CyaSSL_CTX_load_verify_buffer wolfSSL_CTX_load_verify_buffer
  387. #define CyaSSL_CTX_use_PrivateKey_file wolfSSL_CTX_use_PrivateKey_file
  388. #define CyaSSL_CTX_use_certificate_file wolfSSL_CTX_use_certificate_file
  389. #define CyaSSL_CTX_use_PrivateKey_buffer wolfSSL_CTX_use_PrivateKey_buffer
  390. #define CyaSSL_CTX_use_certificate_buffer wolfSSL_CTX_use_certificate_buffer
  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_CTX_set_cipher_list wolfSSL_CTX_set_cipher_list
  429. #define CyaSSL_CTX_set_group_messages wolfSSL_CTX_set_group_messages
  430. #define CyaSSL_CTX_set_session_cache_mode wolfSSL_CTX_set_session_cache_mode
  431. /* Callbacks */
  432. /*
  433. * Empty comment denotes not listed in CyaSSL Manual
  434. * (soon to be wolfSSL Manual)
  435. */
  436. #define CyaSSL_accept_ex wolfSSL_accept_ex
  437. #define CyaSSL_SetIORecv wolfSSL_CTX_SetIORecv
  438. #define CyaSSL_SetIOSend wolfSSL_CTX_SetIOSend
  439. #define CyaSSL_connect_ex wolfSSL_connect_ex
  440. #define CyaSSL_CTX_SetCACb wolfSSL_CTX_SetCACb
  441. #define CyaSSL_SetIOReadCtx wolfSSL_SetIOReadCtx
  442. #define CyaSSL_SetRsaEncCtx wolfSSL_SetRsaEncCtx
  443. #define CyaSSL_GetRsaEncCtx wolfSSL_GetRsaEncCtx
  444. #define CyaSSL_SetRsaDecCtx wolfSSL_SetRsaDecCtx
  445. #define CyaSSL_GetRsaDecCtx wolfSSL_GetRsaDecCtx
  446. #define CyaSSL_SetLoggingCb wolfSSL_SetLoggingCb
  447. #define CyaSSL_SetEccSignCtx wolfSSL_SetEccSignCtx
  448. #define CyaSSL_GetEccSignCtx wolfSSL_GetEccSignCtx
  449. #define CyaSSL_SetRsaSignCtx wolfSSL_SetRsaSignCtx
  450. #define CyaSSL_GetRsaSignCtx wolfSSL_GetRsaSignCtx
  451. #define CyaSSL_SetIOWriteCtx wolfSSL_SetIOWriteCtx
  452. #define CyaSSL_SetIOReadFlags wolfSSL_SetIOReadFlags
  453. #define CyaSSL_SetEccVerifyCtx wolfSSL_SetEccVerifyCtx
  454. #define CyaSSL_GetEccVerifyCtx wolfSSL_GetEccVerifyCtx
  455. #define CyaSSL_SetRsaVerifyCtx wolfSSL_SetRsaVerifyCtx
  456. #define CyaSSL_GetRsaVerifyCtx wolfSSL_GetRsaVerifyCtx
  457. #define CyaSSL_CTX_SetRsaEncCb wolfSSL_CTX_SetRsaEncCb
  458. #define CyaSSL_CTX_SetRsaDecCb wolfSSL_CTX_SetRsaDecCb
  459. #define CyaSSL_SetIOWriteFlags wolfSSL_SetIOWriteFlags
  460. #define CyaSSL_SetTlsHmacInner wolfSSL_SetTlsHmacInner
  461. #define CyaSSL_SetMacEncryptCtx wolfSSL_SetMacEncryptCtx
  462. #define CyaSSL_GetMacEncryptCtx wolfSSL_GetMacEncryptCtx
  463. #define CyaSSL_CTX_SetEccSignCb wolfSSL_CTX_SetEccSignCb
  464. #define CyaSSL_CTX_SetRsaSignCb wolfSSL_CTX_SetRsaSignCb
  465. #define CyaSSL_CTX_SetEccVerifyCb wolfSSL_CTX_SetEccVerifyCb
  466. #define CyaSSL_CTX_SetRsaVerifyCb wolfSSL_CTX_SetRsaVerifyCb
  467. #define CyaSSL_CTX_SetMacEncryptCb wolfSSL_CTX_SetMacEncryptCb
  468. #define CyaSSL_SetDecryptVerifyCtx wolfSSL_SetDecryptVerifyCtx
  469. #define CyaSSL_GetDecryptVerifyCtx wolfSSL_GetDecryptVerifyCtx
  470. #define CyaSSL_CTX_SetDecryptVerifyCb wolfSSL_CTX_SetDecryptVerifyCb
  471. /* psk specific */
  472. #ifndef NO_PSK
  473. #define CyaSSL_get_psk_identity wolfSSL_get_psk_identity /**/
  474. #define CyaSSL_get_psk_identity_hint wolfSSL_get_psk_identity_hint /**/
  475. #define CyaSSL_use_psk_identity_hint wolfSSL_use_psk_identity_hint /**/
  476. #define CyaSSL_set_psk_client_callback wolfSSL_set_psk_client_callback /**/
  477. #define CyaSSL_set_psk_server_callback wolfSSL_set_psk_server_callback /**/
  478. #define CyaSSL_CTX_use_psk_identity_hint wolfSSL_CTX_use_psk_identity_hint /**/
  479. #define CyaSSL_CTX_set_psk_client_callback \
  480. wolfSSL_CTX_set_psk_client_callback /**/
  481. #define CyaSSL_CTX_set_psk_server_callback \
  482. wolfSSL_CTX_set_psk_server_callback /**/
  483. #endif
  484. /* end psk specific */
  485. /* Anonymous */
  486. #define CyaSSL_CTX_allow_anon_cipher wolfSSL_CTX_allow_anon_cipher /**/
  487. /* Error Handling and Debugging*/
  488. #define CyaSSL_get_error wolfSSL_get_error
  489. #define CyaSSL_want_read wolfSSL_want_read
  490. #define CyaSSL_want_write wolfSSL_want_write
  491. #define CyaSSL_Debugging_ON wolfSSL_Debugging_ON
  492. #define CyaSSL_Debugging_OFF wolfSSL_Debugging_OFF
  493. #define CyaSSL_ERR_error_string wolfSSL_ERR_error_string
  494. #define CyaSSL_load_error_strings wolfSSL_load_error_strings
  495. #define CyaSSL_ERR_error_string_n wolfSSL_ERR_error_string_n
  496. #define CyaSSL_ERR_print_errors_fp wolfSSL_ERR_print_errors_fp
  497. /* OCSP and CRL */
  498. /*
  499. * Empty comment denotes not listed in CyaSSL Manual
  500. * (soon to be wolfSSL Manual)
  501. */
  502. #define CYASSL_CRL_MONITOR WOLFSSL_CRL_MONITOR /**/
  503. #define CYASSL_CRL_START_MON WOLFSSL_CRL_START_MON /**/
  504. #define CYASSL_OCSP_NO_NONCE WOLFSSL_OCSP_NO_NONCE /**/
  505. #define CYASSL_OCSP_URL_OVERRIDE WOLFSSL_OCSP_URL_OVERRIDE
  506. #define CYASSL_OCSP_CHECKALL WOLFSSL_OCSP_CHECKALL
  507. #define CyaSSL_CTX_EnableOCSP wolfSSL_CTX_EnableOCSP
  508. #define CyaSSL_CTX_OCSP_set_options wolfSSL_CTX_OCSP_set_options /**/
  509. #define CyaSSL_CTX_SetOCSP_OverrideURL wolfSSL_CTX_SetOCSP_OverrideURL /**/
  510. #define CyaSSL_CTX_OCSP_set_override_url wolfSSL_CTX_OCSP_set_override_url /**/
  511. /* Informational */
  512. #define CyaSSL_GetSide wolfSSL_GetSide
  513. #define CyaSSL_IsTLSv1_1 wolfSSL_IsTLSv1_1
  514. #define CyaSSL_GetKeySize wolfSSL_GetKeySize
  515. #define CyaSSL_GetHmacSize wolfSSL_GetHmacSize
  516. #define CyaSSL_GetHmacType wolfSSL_GetHmacType
  517. #define CyaSSL_GetMacSecret wolfSSL_GetMacSecret
  518. #define CyaSSL_GetObjectSize wolfSSL_GetObjectSize
  519. #define CyaSSL_GetBulkCipher wolfSSL_GetBulkCipher
  520. #define CyaSSL_GetCipherType wolfSSL_GetCipherType
  521. #define CyaSSL_GetAeadMacSize wolfSSL_GetAeadMacSize
  522. #define CyaSSL_GetClientWriteIV wolfSSL_GetClientWriteIV
  523. #define CyaSSL_GetServerWriteIV wolfSSL_GetServerWriteIV
  524. #define CyaSSL_GetClientWriteKey wolfSSL_GetClientWriteKey
  525. #define CyaSSL_GetServerWriteKey wolfSSL_GetServerWriteKey
  526. #define CyaSSL_GetCipherBlockSize wolfSSL_GetCipherBlockSize
  527. /* Connection, Session, and I/O */
  528. #define CyaSSL_peek wolfSSL_peek
  529. #define CyaSSL_read wolfSSL_read
  530. #define CyaSSL_recv wolfSSL_recv
  531. #define CyaSSL_send wolfSSL_send
  532. #define CyaSSL_write wolfSSL_write
  533. #define CyaSSL_writev wolfSSL_writev
  534. #define CyaSSL_accept wolfSSL_accept
  535. #define CyaSSL_get_fd wolfSSL_get_fd
  536. #define CyaSSL_connect wolfSSL_connect
  537. #define CyaSSL_pending wolfSSL_pending
  538. #define CyaSSL_negotiate wolfSSL_negotiate
  539. #define CyaSSL_get_session wolfSSL_get_session
  540. #define CyaSSL_connect_cert wolfSSL_connect_cert
  541. #define CyaSSL_flush_sessions wolfSSL_flush_sessions
  542. #define CyaSSL_get_using_nonblock wolfSSL_get_using_nonblock
  543. #define CyaSSL_PrintSessionStats wolfSSL_PrintSessionStats
  544. /* DTLS Specific */
  545. #define CyaSSL_dtls wolfSSL_dtls
  546. #define CyaSSL_dtls_set_peer wolfSSL_dtls_set_peer
  547. #define CyaSSL_dtls_get_peer wolfSSL_dtls_get_peer
  548. #define CyaSSL_dtls_got_timeout wolfSSL_dtls_got_timeout
  549. #define CyaSSL_dtls_get_current_timeout wolfSSL_dtls_get_current_timeout
  550. #define CyaSSL_set_using_nonblock wolfSSL_dtls_set_using_nonblock
  551. /* Certificate Manager */
  552. #define CyaSSL_CertManagerNew wolfSSL_CertManagerNew
  553. #define CyaSSL_CertManagerFree wolfSSL_CertManagerFree
  554. #define CyaSSL_CertManagerLoadCA wolfSSL_CertManagerLoadCA
  555. #define CyaSSL_CertManagerVerify wolfSSL_CertManagerVerify
  556. #define CyaSSL_CertManagerEnableCRL wolfSSL_CertManagerEnableCRL
  557. #define CyaSSL_CertManagerDisableCRL wolfSSL_CertManagerDisableCRL
  558. #define CyaSSL_CertManagerVerifyBuffer wolfSSL_CertManagerVerifyBuffer
  559. #ifndef NO_CERTS
  560. #define CyaSSL_CertManagerCheckCRL wolfSSL_CertManagerCheckCRL
  561. #define CyaSSL_CertManagerLoadCRL wolfSSL_CertManagerLoadCRL
  562. #define CyaSSL_CertManagerSetCRL_Cb wolfSSL_CertManagerSetCRL_Cb
  563. #define CyaSSL_CertManagerCheckOCSP wolfSSL_CertManagerCheckOCSP
  564. #define CyaSSL_CertManagerSetOCSP_Cb wolfSSL_CertManagerSetOCSP_Cb
  565. #define CyaSSL_CertManagerSetOCSPOverrideURL \
  566. wolfSSL_CertManagerSetOCSPOverrideURL
  567. #define CyaSSL_DisableCRL wolfSSL_DisableCRL
  568. #define CyaSSL_EnableOCSP wolfSSL_EnableOCSP
  569. #define CyaSSL_DisableOCSP wolfSSL_DisableOCSP
  570. #define CyaSSL_SetOCSP_OverrideURL wolfSSL_SetOCSP_OverrideURL
  571. #define CyaSSL_SetOCSP_Cb wolfSSL_SetOCSP_Cb
  572. #define CyaSSL_CTX_EnableCRL wolfSSL_CTX_EnableCRL
  573. #define CyaSSL_CTX_DisableCRL wolfSSL_CTX_DisableCRL
  574. #define CyaSSL_CTX_LoadCRL wolfSSL_CTX_LoadCRL
  575. #define CyaSSL_CTX_SetCRL_Cb wolfSSL_CTX_SetCRL_Cb
  576. #define CyaSSL_CTX_DisableOCSP wolfSSL_CTX_DisableOCSP
  577. #define CyaSSL_CTX_SetOCSP_Cb wolfSSL_CTX_SetOCSP_Cb
  578. #endif /* !NO_CERTS */
  579. /* OpenSSL Compatibility Layer */
  580. #define CyaSSL_get_sessionID wolfSSL_get_sessionID
  581. #define CyaSSL_get_peer_count wolfSSL_get_peer_count
  582. #define CyaSSL_get_chain_cert wolfSSL_get_chain_cert
  583. #define CyaSSL_get_peer_chain wolfSSL_get_peer_chain
  584. #define CyaSSL_get_peer_length wolfSSL_get_peer_length
  585. #define CyaSSL_get_chain_cert_pem wolfSSL_get_chain_cert_pem
  586. #define CyaSSL_use_PrivateKey_file wolfSSL_use_PrivateKey_file
  587. #define CyaSSL_use_certificate_file wolfSSL_use_certificate_file
  588. #define CyaSSL_use_RSAPrivateKey_file wolfSSL_use_RSAPrivateKey_file
  589. #define CyaSSL_X509_get_serial_number wolfSSL_X509_get_serial_number
  590. #define CyaSSL_CTX_use_RSAPrivateKey_file wolfSSL_CTX_use_RSAPrivateKey_file
  591. #define CyaSSL_use_certificate_chain_file wolfSSL_use_certificate_chain_file
  592. /* TLS Extensions */
  593. #define CYASSL_SNI_HOST_NAME WOLFSSL_SNI_HOST_NAME
  594. #define CyaSSL_UseSNI wolfSSL_UseSNI
  595. #define CyaSSL_CTX_UseSNI wolfSSL_CTX_UseSNI
  596. #define CyaSSL_SNI_SetOptions wolfSSL_SNI_SetOptions
  597. #define CyaSSL_SNI_GetRequest wolfSSL_SNI_GetRequest
  598. #define CyaSSL_UseMaxFragment wolfSSL_UseMaxFragment
  599. #define CyaSSL_UseTruncatedHMAC wolfSSL_UseTruncatedHMAC
  600. #define CyaSSL_UseSupportedCurve wolfSSL_UseSupportedCurve
  601. #define CyaSSL_SNI_GetFromBuffer wolfSSL_SNI_GetFromBuffer
  602. #define CyaSSL_CTX_SNI_SetOptions wolfSSL_CTX_SNI_SetOptions
  603. #define CyaSSL_CTX_UseMaxFragment wolfSSL_CTX_UseMaxFragment
  604. #define CyaSSL_CTX_UseTruncatedHMAC wolfSSL_CTX_UseTruncatedHMAC
  605. #define CyaSSL_CTX_UseSupportedCurve wolfSSL_CTX_UseSupportedCurve
  606. /* End wolfssl -> cyassl -> openssl compatibility */
  607. /* JRB macro redefinitions and api calls for cryptography for reverse compat. */
  608. #ifdef WOLFSSL_SMALL_STACK
  609. #define CYASSL_SMALL_STACK
  610. #endif
  611. /*
  612. * wrapper around macros until they are changed in cyassl code
  613. * needs investigation in regards to macros in fips
  614. */
  615. #ifdef NO_CYASSL_ALLOC_ALIGN
  616. #define NO_WOLFSSL_ALLOC_ALIGN NO_CYASSL_ALLOC_ALIGN
  617. #endif
  618. /* examples/client/client.h */
  619. #define CYASSL_THREAD WOLFSSL_THREAD
  620. #ifdef WOLFSSL_DTLS
  621. #define CYASSL_DTLS WOLFSSL_DTLS
  622. #endif
  623. /* examples/client/client.c */
  624. #define LIBCYASSL_VERSION_STRING LIBWOLFSSL_VERSION_STRING
  625. #ifdef __cplusplus
  626. } /* extern "C" */
  627. #endif
  628. #endif /* CyaSSL_openssl_h__ */