source: asp3_tinet_ecnl_rx/trunk/wolfssl-3.12.2/cyassl/ssl.h@ 337

Last change on this file since 337 was 337, checked in by coas-nagasima, 6 years ago

ASP3版ECNLを追加

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