[352] | 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 defines wolfssl_openssl compatibility layer
|
---|
| 25 | *
|
---|
| 26 | */
|
---|
| 27 |
|
---|
| 28 |
|
---|
| 29 | #ifndef WOLFSSL_OPENSSL_H_
|
---|
| 30 | #define WOLFSSL_OPENSSL_H_
|
---|
| 31 |
|
---|
| 32 | /* wolfssl_openssl compatibility layer */
|
---|
| 33 | #include <wolfssl/ssl.h>
|
---|
| 34 |
|
---|
| 35 | #include <wolfssl/openssl/evp.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 WOLFSSL_UTASKER
|
---|
| 47 | /* tcpip.h clashes */
|
---|
| 48 | #undef ASN1_INTEGER
|
---|
| 49 | #endif
|
---|
| 50 |
|
---|
| 51 |
|
---|
| 52 | typedef WOLFSSL SSL;
|
---|
| 53 | typedef WOLFSSL_SESSION SSL_SESSION;
|
---|
| 54 | typedef WOLFSSL_METHOD SSL_METHOD;
|
---|
| 55 | typedef WOLFSSL_CTX SSL_CTX;
|
---|
| 56 |
|
---|
| 57 | typedef WOLFSSL_X509 X509;
|
---|
| 58 | typedef WOLFSSL_X509_NAME X509_NAME;
|
---|
| 59 | typedef WOLFSSL_X509_CHAIN X509_CHAIN;
|
---|
| 60 |
|
---|
| 61 |
|
---|
| 62 | /* redeclare guard */
|
---|
| 63 | #define WOLFSSL_TYPES_DEFINED
|
---|
| 64 |
|
---|
| 65 |
|
---|
| 66 | typedef WOLFSSL_EVP_PKEY EVP_PKEY;
|
---|
| 67 | typedef WOLFSSL_BIO BIO;
|
---|
| 68 | typedef WOLFSSL_BIO_METHOD BIO_METHOD;
|
---|
| 69 | typedef WOLFSSL_CIPHER SSL_CIPHER;
|
---|
| 70 | typedef WOLFSSL_X509_LOOKUP X509_LOOKUP;
|
---|
| 71 | typedef WOLFSSL_X509_LOOKUP_METHOD X509_LOOKUP_METHOD;
|
---|
| 72 | typedef WOLFSSL_X509_CRL X509_CRL;
|
---|
| 73 | typedef WOLFSSL_X509_EXTENSION X509_EXTENSION;
|
---|
| 74 | typedef WOLFSSL_ASN1_TIME ASN1_TIME;
|
---|
| 75 | typedef WOLFSSL_ASN1_INTEGER ASN1_INTEGER;
|
---|
| 76 | typedef WOLFSSL_ASN1_OBJECT ASN1_OBJECT;
|
---|
| 77 | typedef WOLFSSL_ASN1_STRING ASN1_STRING;
|
---|
| 78 | typedef WOLFSSL_dynlock_value CRYPTO_dynlock_value;
|
---|
| 79 | typedef WOLFSSL_BUF_MEM BUF_MEM;
|
---|
| 80 |
|
---|
| 81 | /* GENERAL_NAME and BASIC_CONSTRAINTS structs may need implemented as
|
---|
| 82 | * compatibility layer expands. For now treating them as an ASN1_OBJECT */
|
---|
| 83 | typedef WOLFSSL_ASN1_OBJECT GENERAL_NAME;
|
---|
| 84 | typedef WOLFSSL_ASN1_OBJECT BASIC_CONSTRAINTS;
|
---|
| 85 |
|
---|
| 86 | #define ASN1_UTCTIME WOLFSSL_ASN1_TIME
|
---|
| 87 | #define ASN1_GENERALIZEDTIME WOLFSSL_ASN1_TIME
|
---|
| 88 |
|
---|
| 89 | typedef WOLFSSL_MD4_CTX MD4_CTX;
|
---|
| 90 | typedef WOLFSSL_COMP_METHOD COMP_METHOD;
|
---|
| 91 | typedef WOLFSSL_X509_REVOKED X509_REVOKED;
|
---|
| 92 | typedef WOLFSSL_X509_OBJECT X509_OBJECT;
|
---|
| 93 | typedef WOLFSSL_X509_STORE X509_STORE;
|
---|
| 94 | typedef WOLFSSL_X509_STORE_CTX X509_STORE_CTX;
|
---|
| 95 |
|
---|
| 96 | #define CRYPTO_free XFREE
|
---|
| 97 | #define CRYPTO_malloc XMALLOC
|
---|
| 98 |
|
---|
| 99 | #define SSL_get_client_random(ssl,out,outSz) \
|
---|
| 100 | wolfSSL_get_client_random((ssl),(out),(outSz))
|
---|
| 101 | #define SSL_get_cipher_list(ctx,i) wolfSSL_get_cipher_list_ex((ctx),(i))
|
---|
| 102 | #define SSL_get_cipher_name(ctx) wolfSSL_get_cipher((ctx))
|
---|
| 103 | #define SSL_get_shared_ciphers(ctx,buf,len) \
|
---|
| 104 | wolfSSL_get_shared_ciphers((ctx),(buf),(len))
|
---|
| 105 |
|
---|
| 106 | #define ERR_print_errors_fp(file) wolfSSL_ERR_dump_errors_fp((file))
|
---|
| 107 |
|
---|
| 108 | /* at the moment only returns ok */
|
---|
| 109 | #define SSL_get_verify_result wolfSSL_get_verify_result
|
---|
| 110 | #define SSL_get_verify_mode wolfSSL_SSL_get_mode
|
---|
| 111 | #define SSL_get_verify_depth wolfSSL_get_verify_depth
|
---|
| 112 | #define SSL_CTX_get_verify_mode wolfSSL_CTX_get_verify_mode
|
---|
| 113 | #define SSL_CTX_get_verify_depth wolfSSL_CTX_get_verify_depth
|
---|
| 114 | #define SSL_get_certificate wolfSSL_get_certificate
|
---|
| 115 | #define SSL_use_certificate wolfSSL_use_certificate
|
---|
| 116 | #define SSL_use_certificate_ASN1 wolfSSL_use_certificate_ASN1
|
---|
| 117 |
|
---|
| 118 | #define SSL_use_PrivateKey wolfSSL_use_PrivateKey
|
---|
| 119 | #define SSL_use_PrivateKey_ASN1 wolfSSL_use_PrivateKey_ASN1
|
---|
| 120 | #define SSL_use_RSAPrivateKey_ASN1 wolfSSL_use_RSAPrivateKey_ASN1
|
---|
| 121 | #define SSL_get_privatekey wolfSSL_get_privatekey
|
---|
| 122 |
|
---|
| 123 | #define SSLv23_method wolfSSLv23_method
|
---|
| 124 | #define SSLv3_server_method wolfSSLv3_server_method
|
---|
| 125 | #define SSLv3_client_method wolfSSLv3_client_method
|
---|
| 126 | #define TLSv1_server_method wolfTLSv1_server_method
|
---|
| 127 | #define TLSv1_client_method wolfTLSv1_client_method
|
---|
| 128 | #define TLSv1_1_server_method wolfTLSv1_1_server_method
|
---|
| 129 | #define TLSv1_1_client_method wolfTLSv1_1_client_method
|
---|
| 130 | #define TLSv1_2_server_method wolfTLSv1_2_server_method
|
---|
| 131 | #define TLSv1_2_client_method wolfTLSv1_2_client_method
|
---|
| 132 |
|
---|
| 133 | #ifdef WOLFSSL_DTLS
|
---|
| 134 | #define DTLSv1_client_method wolfDTLSv1_client_method
|
---|
| 135 | #define DTLSv1_server_method wolfDTLSv1_server_method
|
---|
| 136 | #define DTLSv1_2_client_method wolfDTLSv1_2_client_method
|
---|
| 137 | #define DTLSv1_2_server_method wolfDTLSv1_2_server_method
|
---|
| 138 | #endif
|
---|
| 139 |
|
---|
| 140 |
|
---|
| 141 | #ifndef NO_FILESYSTEM
|
---|
| 142 | #define SSL_CTX_use_certificate_file wolfSSL_CTX_use_certificate_file
|
---|
| 143 | #define SSL_CTX_use_PrivateKey_file wolfSSL_CTX_use_PrivateKey_file
|
---|
| 144 | #define SSL_CTX_load_verify_locations wolfSSL_CTX_load_verify_locations
|
---|
| 145 | #define SSL_CTX_use_certificate_chain_file wolfSSL_CTX_use_certificate_chain_file
|
---|
| 146 | #define SSL_CTX_use_RSAPrivateKey_file wolfSSL_CTX_use_RSAPrivateKey_file
|
---|
| 147 |
|
---|
| 148 | #define SSL_use_certificate_file wolfSSL_use_certificate_file
|
---|
| 149 | #define SSL_use_PrivateKey_file wolfSSL_use_PrivateKey_file
|
---|
| 150 | #define SSL_use_certificate_chain_file wolfSSL_use_certificate_chain_file
|
---|
| 151 | #define SSL_use_RSAPrivateKey_file wolfSSL_use_RSAPrivateKey_file
|
---|
| 152 | #endif
|
---|
| 153 |
|
---|
| 154 | #define SSL_CTX_new wolfSSL_CTX_new
|
---|
| 155 | #define SSL_new wolfSSL_new
|
---|
| 156 | #define SSL_set_fd wolfSSL_set_fd
|
---|
| 157 | #define SSL_get_fd wolfSSL_get_fd
|
---|
| 158 | #define SSL_connect wolfSSL_connect
|
---|
| 159 | #define SSL_clear wolfSSL_clear
|
---|
| 160 | #define SSL_state wolfSSL_state
|
---|
| 161 |
|
---|
| 162 | #define SSL_write wolfSSL_write
|
---|
| 163 | #define SSL_read wolfSSL_read
|
---|
| 164 | #define SSL_peek wolfSSL_peek
|
---|
| 165 | #define SSL_accept wolfSSL_accept
|
---|
| 166 | #define SSL_CTX_free wolfSSL_CTX_free
|
---|
| 167 | #define SSL_free wolfSSL_free
|
---|
| 168 | #define SSL_shutdown wolfSSL_shutdown
|
---|
| 169 |
|
---|
| 170 | #define SSL_CTX_set_quiet_shutdown wolfSSL_CTX_set_quiet_shutdown
|
---|
| 171 | #define SSL_set_quiet_shutdown wolfSSL_set_quiet_shutdown
|
---|
| 172 | #define SSL_get_error wolfSSL_get_error
|
---|
| 173 | #define SSL_set_session wolfSSL_set_session
|
---|
| 174 | #define SSL_get_session wolfSSL_get_session
|
---|
| 175 | #define SSL_flush_sessions wolfSSL_flush_sessions
|
---|
| 176 | /* assume unlimited temporarily */
|
---|
| 177 | #define SSL_CTX_get_session_cache_mode(ctx) 0
|
---|
| 178 |
|
---|
| 179 | #define SSL_CTX_set_verify wolfSSL_CTX_set_verify
|
---|
| 180 | #define SSL_set_verify wolfSSL_set_verify
|
---|
| 181 | #define SSL_pending wolfSSL_pending
|
---|
| 182 | #define SSL_load_error_strings wolfSSL_load_error_strings
|
---|
| 183 | #define SSL_library_init wolfSSL_library_init
|
---|
| 184 | #define SSL_CTX_set_session_cache_mode wolfSSL_CTX_set_session_cache_mode
|
---|
| 185 | #define SSL_CTX_set_cipher_list wolfSSL_CTX_set_cipher_list
|
---|
| 186 | #define SSL_set_cipher_list wolfSSL_set_cipher_list
|
---|
| 187 |
|
---|
| 188 | #define ERR_error_string wolfSSL_ERR_error_string
|
---|
| 189 | #define ERR_error_string_n wolfSSL_ERR_error_string_n
|
---|
| 190 | #define ERR_reason_error_string wolfSSL_ERR_reason_error_string
|
---|
| 191 |
|
---|
| 192 | #define SSL_set_ex_data wolfSSL_set_ex_data
|
---|
| 193 | #define SSL_get_shutdown wolfSSL_get_shutdown
|
---|
| 194 | #define SSL_set_rfd wolfSSL_set_rfd
|
---|
| 195 | #define SSL_set_wfd wolfSSL_set_wfd
|
---|
| 196 | #define SSL_set_shutdown wolfSSL_set_shutdown
|
---|
| 197 | #define SSL_set_session_id_context wolfSSL_set_session_id_context
|
---|
| 198 | #define SSL_set_connect_state wolfSSL_set_connect_state
|
---|
| 199 | #define SSL_set_accept_state wolfSSL_set_accept_state
|
---|
| 200 | #define SSL_session_reused wolfSSL_session_reused
|
---|
| 201 | #define SSL_SESSION_free wolfSSL_SESSION_free
|
---|
| 202 | #define SSL_is_init_finished wolfSSL_is_init_finished
|
---|
| 203 |
|
---|
| 204 | #define SSL_get_version wolfSSL_get_version
|
---|
| 205 | #define SSL_get_current_cipher wolfSSL_get_current_cipher
|
---|
| 206 |
|
---|
| 207 | /* use wolfSSL_get_cipher_name for its return format */
|
---|
| 208 | #define SSL_get_cipher wolfSSL_get_cipher_name
|
---|
| 209 | #define SSL_CIPHER_description wolfSSL_CIPHER_description
|
---|
| 210 | #define SSL_CIPHER_get_name wolfSSL_CIPHER_get_name
|
---|
| 211 | #define SSL_get1_session wolfSSL_get1_session
|
---|
| 212 |
|
---|
| 213 | #define SSL_get_keyblock_size wolfSSL_get_keyblock_size
|
---|
| 214 | #define SSL_get_keys wolfSSL_get_keys
|
---|
| 215 | #define SSL_SESSION_get_master_key wolfSSL_SESSION_get_master_key
|
---|
| 216 | #define SSL_SESSION_get_master_key_length wolfSSL_SESSION_get_master_key_length
|
---|
| 217 |
|
---|
| 218 | #define X509_NAME_get_text_by_NID wolfSSL_X509_NAME_get_text_by_NID
|
---|
| 219 | #define X509_get_ext_d2i wolfSSL_X509_get_ext_d2i
|
---|
| 220 | #define X509_digest wolfSSL_X509_digest
|
---|
| 221 | #define X509_free wolfSSL_X509_free
|
---|
| 222 | #define OPENSSL_free wolfSSL_OPENSSL_free
|
---|
| 223 |
|
---|
| 224 | #define OCSP_parse_url wolfSSL_OCSP_parse_url
|
---|
| 225 | #define SSLv23_client_method wolfSSLv23_client_method
|
---|
| 226 | #define SSLv2_client_method wolfSSLv2_client_method
|
---|
| 227 | #define SSLv2_server_method wolfSSLv2_server_method
|
---|
| 228 |
|
---|
| 229 | #define MD4_Init wolfSSL_MD4_Init
|
---|
| 230 | #define MD4_Update wolfSSL_MD4_Update
|
---|
| 231 | #define MD4_Final wolfSSL_MD4_Final
|
---|
| 232 |
|
---|
| 233 | #define BIO_new wolfSSL_BIO_new
|
---|
| 234 | #define BIO_free wolfSSL_BIO_free
|
---|
| 235 | #define BIO_free_all wolfSSL_BIO_free_all
|
---|
| 236 | #define BIO_nread0 wolfSSL_BIO_nread0
|
---|
| 237 | #define BIO_nread wolfSSL_BIO_nread
|
---|
| 238 | #define BIO_read wolfSSL_BIO_read
|
---|
| 239 | #define BIO_nwrite0 wolfSSL_BIO_nwrite0
|
---|
| 240 | #define BIO_nwrite wolfSSL_BIO_nwrite
|
---|
| 241 | #define BIO_write wolfSSL_BIO_write
|
---|
| 242 | #define BIO_push wolfSSL_BIO_push
|
---|
| 243 | #define BIO_pop wolfSSL_BIO_pop
|
---|
| 244 | #define BIO_flush wolfSSL_BIO_flush
|
---|
| 245 | #define BIO_pending wolfSSL_BIO_pending
|
---|
| 246 |
|
---|
| 247 | #define BIO_get_mem_data wolfSSL_BIO_get_mem_data
|
---|
| 248 | #define BIO_new_mem_buf wolfSSL_BIO_new_mem_buf
|
---|
| 249 |
|
---|
| 250 | #define BIO_f_buffer wolfSSL_BIO_f_buffer
|
---|
| 251 | #define BIO_set_write_buffer_size wolfSSL_BIO_set_write_buffer_size
|
---|
| 252 | #define BIO_f_ssl wolfSSL_BIO_f_ssl
|
---|
| 253 | #define BIO_new_socket wolfSSL_BIO_new_socket
|
---|
| 254 | #define SSL_set_bio wolfSSL_set_bio
|
---|
| 255 | #define BIO_eof wolfSSL_BIO_eof
|
---|
| 256 | #define BIO_set_ss wolfSSL_BIO_set_ss
|
---|
| 257 |
|
---|
| 258 | #define BIO_s_mem wolfSSL_BIO_s_mem
|
---|
| 259 | #define BIO_f_base64 wolfSSL_BIO_f_base64
|
---|
| 260 | #define BIO_set_flags wolfSSL_BIO_set_flags
|
---|
| 261 |
|
---|
| 262 | #define OpenSSL_add_all_digests()
|
---|
| 263 | #define OpenSSL_add_all_algorithms wolfSSL_add_all_algorithms
|
---|
| 264 | #define SSLeay_add_ssl_algorithms wolfSSL_add_all_algorithms
|
---|
| 265 | #define SSLeay_add_all_algorithms wolfSSL_add_all_algorithms
|
---|
| 266 |
|
---|
| 267 | #define RAND_screen wolfSSL_RAND_screen
|
---|
| 268 | #define RAND_file_name wolfSSL_RAND_file_name
|
---|
| 269 | #define RAND_write_file wolfSSL_RAND_write_file
|
---|
| 270 | #define RAND_load_file wolfSSL_RAND_load_file
|
---|
| 271 | #define RAND_egd wolfSSL_RAND_egd
|
---|
| 272 | #define RAND_seed wolfSSL_RAND_seed
|
---|
| 273 | #define RAND_add wolfSSL_RAND_add
|
---|
| 274 |
|
---|
| 275 | #define COMP_zlib wolfSSL_COMP_zlib
|
---|
| 276 | #define COMP_rle wolfSSL_COMP_rle
|
---|
| 277 | #define SSL_COMP_add_compression_method wolfSSL_COMP_add_compression_method
|
---|
| 278 |
|
---|
| 279 | #define SSL_get_ex_new_index wolfSSL_get_ex_new_index
|
---|
| 280 |
|
---|
| 281 | #define CRYPTO_set_id_callback wolfSSL_set_id_callback
|
---|
| 282 | #define CRYPTO_set_locking_callback wolfSSL_set_locking_callback
|
---|
| 283 | #define CRYPTO_set_dynlock_create_callback wolfSSL_set_dynlock_create_callback
|
---|
| 284 | #define CRYPTO_set_dynlock_lock_callback wolfSSL_set_dynlock_lock_callback
|
---|
| 285 | #define CRYPTO_set_dynlock_destroy_callback wolfSSL_set_dynlock_destroy_callback
|
---|
| 286 | #define CRYPTO_num_locks wolfSSL_num_locks
|
---|
| 287 |
|
---|
| 288 |
|
---|
| 289 | #define CRYPTO_LOCK 1
|
---|
| 290 | #define CRYPTO_UNLOCK 2
|
---|
| 291 | #define CRYPTO_READ 4
|
---|
| 292 | #define CRYPTO_WRITE 8
|
---|
| 293 |
|
---|
| 294 | #define X509_STORE_CTX_get_current_cert wolfSSL_X509_STORE_CTX_get_current_cert
|
---|
| 295 | #define X509_STORE_add_cert wolfSSL_X509_STORE_add_cert
|
---|
| 296 | #define X509_STORE_set_flags wolfSSL_X509_STORE_set_flags
|
---|
| 297 | #define X509_STORE_CTX_get_chain wolfSSL_X509_STORE_CTX_get_chain
|
---|
| 298 | #define X509_STORE_CTX_get_error wolfSSL_X509_STORE_CTX_get_error
|
---|
| 299 | #define X509_STORE_CTX_get_error_depth wolfSSL_X509_STORE_CTX_get_error_depth
|
---|
| 300 |
|
---|
| 301 | #define X509_NAME_oneline wolfSSL_X509_NAME_oneline
|
---|
| 302 | #define X509_get_issuer_name wolfSSL_X509_get_issuer_name
|
---|
| 303 | #define X509_get_subject_name wolfSSL_X509_get_subject_name
|
---|
| 304 | #define X509_verify_cert_error_string wolfSSL_X509_verify_cert_error_string
|
---|
| 305 |
|
---|
| 306 | #define X509_LOOKUP_add_dir wolfSSL_X509_LOOKUP_add_dir
|
---|
| 307 | #define X509_LOOKUP_load_file wolfSSL_X509_LOOKUP_load_file
|
---|
| 308 | #define X509_LOOKUP_hash_dir wolfSSL_X509_LOOKUP_hash_dir
|
---|
| 309 | #define X509_LOOKUP_file wolfSSL_X509_LOOKUP_file
|
---|
| 310 |
|
---|
| 311 | #define X509_STORE_add_lookup wolfSSL_X509_STORE_add_lookup
|
---|
| 312 | #define X509_STORE_new wolfSSL_X509_STORE_new
|
---|
| 313 | #define X509_STORE_get_by_subject wolfSSL_X509_STORE_get_by_subject
|
---|
| 314 | #define X509_STORE_CTX_init wolfSSL_X509_STORE_CTX_init
|
---|
| 315 | #define X509_STORE_CTX_cleanup wolfSSL_X509_STORE_CTX_cleanup
|
---|
| 316 |
|
---|
| 317 | #define X509_CRL_get_lastUpdate wolfSSL_X509_CRL_get_lastUpdate
|
---|
| 318 | #define X509_CRL_get_nextUpdate wolfSSL_X509_CRL_get_nextUpdate
|
---|
| 319 |
|
---|
| 320 | #define X509_get_pubkey wolfSSL_X509_get_pubkey
|
---|
| 321 | #define X509_CRL_verify wolfSSL_X509_CRL_verify
|
---|
| 322 | #define X509_STORE_CTX_set_error wolfSSL_X509_STORE_CTX_set_error
|
---|
| 323 | #define X509_OBJECT_free_contents wolfSSL_X509_OBJECT_free_contents
|
---|
| 324 | #define EVP_PKEY_new wolfSSL_PKEY_new
|
---|
| 325 | #define EVP_PKEY_free wolfSSL_EVP_PKEY_free
|
---|
| 326 | #define EVP_PKEY_type wolfSSL_EVP_PKEY_type
|
---|
| 327 | #define EVP_PKEY_base_id wolfSSL_EVP_PKEY_base_id
|
---|
| 328 | #define X509_cmp_current_time wolfSSL_X509_cmp_current_time
|
---|
| 329 | #define sk_X509_REVOKED_num wolfSSL_sk_X509_REVOKED_num
|
---|
| 330 | #define X509_CRL_get_REVOKED wolfSSL_X509_CRL_get_REVOKED
|
---|
| 331 | #define sk_X509_REVOKED_value wolfSSL_sk_X509_REVOKED_value
|
---|
| 332 | #define X509_get_notBefore(cert) (ASN1_TIME*)wolfSSL_X509_notBefore((cert))
|
---|
| 333 | #define X509_get_notAfter(cert) (ASN1_TIME*)wolfSSL_X509_notAfter((cert))
|
---|
| 334 |
|
---|
| 335 |
|
---|
| 336 | #define X509_get_serialNumber wolfSSL_X509_get_serialNumber
|
---|
| 337 |
|
---|
| 338 | #define ASN1_TIME_print wolfSSL_ASN1_TIME_print
|
---|
| 339 | #define ASN1_GENERALIZEDTIME_print wolfSSL_ASN1_GENERALIZEDTIME_print
|
---|
| 340 |
|
---|
| 341 | #define ASN1_INTEGER_cmp wolfSSL_ASN1_INTEGER_cmp
|
---|
| 342 | #define ASN1_INTEGER_get wolfSSL_ASN1_INTEGER_get
|
---|
| 343 | #define ASN1_INTEGER_to_BN wolfSSL_ASN1_INTEGER_to_BN
|
---|
| 344 | #define ASN1_STRING_to_UTF8 wolfSSL_ASN1_STRING_to_UTF8
|
---|
| 345 |
|
---|
| 346 | #define SSL_load_client_CA_file wolfSSL_load_client_CA_file
|
---|
| 347 |
|
---|
| 348 | #define SSL_CTX_get_client_CA_list wolfSSL_SSL_CTX_get_client_CA_list
|
---|
| 349 | #define SSL_CTX_set_client_CA_list wolfSSL_CTX_set_client_CA_list
|
---|
| 350 | #define SSL_CTX_set_cert_store wolfSSL_CTX_set_cert_store
|
---|
| 351 | #define SSL_CTX_get_cert_store wolfSSL_CTX_get_cert_store
|
---|
| 352 | #define X509_STORE_CTX_get_ex_data wolfSSL_X509_STORE_CTX_get_ex_data
|
---|
| 353 | #define SSL_get_ex_data_X509_STORE_CTX_idx wolfSSL_get_ex_data_X509_STORE_CTX_idx
|
---|
| 354 | #define SSL_get_ex_data wolfSSL_get_ex_data
|
---|
| 355 |
|
---|
| 356 | #define SSL_CTX_set_default_passwd_cb_userdata wolfSSL_CTX_set_default_passwd_cb_userdata
|
---|
| 357 | #define SSL_CTX_set_default_passwd_cb wolfSSL_CTX_set_default_passwd_cb
|
---|
| 358 |
|
---|
| 359 | #define SSL_CTX_set_timeout(ctx, to) wolfSSL_CTX_set_timeout(ctx, (unsigned int) to)
|
---|
| 360 | #define SSL_CTX_set_info_callback wolfSSL_CTX_set_info_callback
|
---|
| 361 |
|
---|
| 362 | #define ERR_peek_error wolfSSL_ERR_peek_error
|
---|
| 363 | #define ERR_peek_last_error_line wolfSSL_ERR_peek_last_error_line
|
---|
| 364 | #define ERR_peek_errors_fp wolfSSL_ERR_peek_errors_fp
|
---|
| 365 | #define ERR_GET_REASON wolfSSL_ERR_GET_REASON
|
---|
| 366 |
|
---|
| 367 | #define SSL_alert_type_string wolfSSL_alert_type_string
|
---|
| 368 | #define SSL_alert_desc_string wolfSSL_alert_desc_string
|
---|
| 369 | #define SSL_state_string wolfSSL_state_string
|
---|
| 370 |
|
---|
| 371 | #define RSA_free wolfSSL_RSA_free
|
---|
| 372 | #define RSA_generate_key wolfSSL_RSA_generate_key
|
---|
| 373 | #define SSL_CTX_set_tmp_rsa_callback wolfSSL_CTX_set_tmp_rsa_callback
|
---|
| 374 |
|
---|
| 375 | #define PEM_def_callback wolfSSL_PEM_def_callback
|
---|
| 376 |
|
---|
| 377 | #define SSL_CTX_sess_accept wolfSSL_CTX_sess_accept
|
---|
| 378 | #define SSL_CTX_sess_connect wolfSSL_CTX_sess_connect
|
---|
| 379 | #define SSL_CTX_sess_accept_good wolfSSL_CTX_sess_accept_good
|
---|
| 380 | #define SSL_CTX_sess_connect_good wolfSSL_CTX_sess_connect_good
|
---|
| 381 | #define SSL_CTX_sess_accept_renegotiate wolfSSL_CTX_sess_accept_renegotiate
|
---|
| 382 | #define SSL_CTX_sess_connect_renegotiate wolfSSL_CTX_sess_connect_renegotiate
|
---|
| 383 | #define SSL_CTX_sess_hits wolfSSL_CTX_sess_hits
|
---|
| 384 | #define SSL_CTX_sess_cb_hits wolfSSL_CTX_sess_cb_hits
|
---|
| 385 | #define SSL_CTX_sess_cache_full wolfSSL_CTX_sess_cache_full
|
---|
| 386 | #define SSL_CTX_sess_misses wolfSSL_CTX_sess_misses
|
---|
| 387 | #define SSL_CTX_sess_timeouts wolfSSL_CTX_sess_timeouts
|
---|
| 388 | #define SSL_CTX_sess_number wolfSSL_CTX_sess_number
|
---|
| 389 | #define SSL_CTX_sess_get_cache_size wolfSSL_CTX_sess_get_cache_size
|
---|
| 390 |
|
---|
| 391 |
|
---|
| 392 | #define SSL_DEFAULT_CIPHER_LIST WOLFSSL_DEFAULT_CIPHER_LIST
|
---|
| 393 | #define RSA_F4 WOLFSSL_RSA_F4
|
---|
| 394 |
|
---|
| 395 | #define SSL_CTX_set_psk_client_callback wolfSSL_CTX_set_psk_client_callback
|
---|
| 396 | #define SSL_set_psk_client_callback wolfSSL_set_psk_client_callback
|
---|
| 397 |
|
---|
| 398 | #define SSL_get_psk_identity_hint wolfSSL_get_psk_identity_hint
|
---|
| 399 | #define SSL_get_psk_identity wolfSSL_get_psk_identity
|
---|
| 400 |
|
---|
| 401 | #define SSL_CTX_use_psk_identity_hint wolfSSL_CTX_use_psk_identity_hint
|
---|
| 402 | #define SSL_use_psk_identity_hint wolfSSL_use_psk_identity_hint
|
---|
| 403 |
|
---|
| 404 | #define SSL_CTX_set_psk_server_callback wolfSSL_CTX_set_psk_server_callback
|
---|
| 405 | #define SSL_set_psk_server_callback wolfSSL_set_psk_server_callback
|
---|
| 406 |
|
---|
| 407 | #define ERR_get_error_line_data wolfSSL_ERR_get_error_line_data
|
---|
| 408 |
|
---|
| 409 | #define ERR_get_error wolfSSL_ERR_get_error
|
---|
| 410 | #define ERR_clear_error wolfSSL_ERR_clear_error
|
---|
| 411 |
|
---|
| 412 | #define RAND_status wolfSSL_RAND_status
|
---|
| 413 | #define RAND_bytes wolfSSL_RAND_bytes
|
---|
| 414 | #define SSLv23_server_method wolfSSLv23_server_method
|
---|
| 415 | #define SSL_CTX_set_options wolfSSL_CTX_set_options
|
---|
| 416 | #define SSL_CTX_check_private_key wolfSSL_CTX_check_private_key
|
---|
| 417 |
|
---|
| 418 | #define ERR_free_strings wolfSSL_ERR_free_strings
|
---|
| 419 | #define ERR_remove_state wolfSSL_ERR_remove_state
|
---|
| 420 | #define EVP_cleanup wolfSSL_EVP_cleanup
|
---|
| 421 |
|
---|
| 422 | #define CRYPTO_cleanup_all_ex_data wolfSSL_cleanup_all_ex_data
|
---|
| 423 | #define SSL_CTX_set_mode wolfSSL_CTX_set_mode
|
---|
| 424 | #define SSL_CTX_get_mode wolfSSL_CTX_get_mode
|
---|
| 425 | #define SSL_CTX_set_default_read_ahead wolfSSL_CTX_set_default_read_ahead
|
---|
| 426 |
|
---|
| 427 | #define SSL_CTX_sess_set_cache_size wolfSSL_CTX_sess_set_cache_size
|
---|
| 428 | #define SSL_CTX_set_default_verify_paths wolfSSL_CTX_set_default_verify_paths
|
---|
| 429 |
|
---|
| 430 | #define SSL_CTX_set_session_id_context wolfSSL_CTX_set_session_id_context
|
---|
| 431 | #define SSL_get_peer_certificate wolfSSL_get_peer_certificate
|
---|
| 432 |
|
---|
| 433 | #define SSL_want_read wolfSSL_want_read
|
---|
| 434 | #define SSL_want_write wolfSSL_want_write
|
---|
| 435 |
|
---|
| 436 | #define BIO_prf wolfSSL_BIO_prf
|
---|
| 437 | #define ASN1_UTCTIME_pr wolfSSL_ASN1_UTCTIME_pr
|
---|
| 438 |
|
---|
| 439 | #define sk_num wolfSSL_sk_num
|
---|
| 440 | #define sk_value wolfSSL_sk_value
|
---|
| 441 | #define sk_X509_pop wolfSSL_sk_X509_pop
|
---|
| 442 | #define sk_X509_free wolfSSL_sk_X509_free
|
---|
| 443 | #define d2i_X509_bio wolfSSL_d2i_X509_bio
|
---|
| 444 |
|
---|
| 445 | #define SSL_CTX_get_ex_data wolfSSL_CTX_get_ex_data
|
---|
| 446 | #define SSL_CTX_set_ex_data wolfSSL_CTX_set_ex_data
|
---|
| 447 | #define SSL_CTX_sess_set_get_cb wolfSSL_CTX_sess_set_get_cb
|
---|
| 448 | #define SSL_CTX_sess_set_new_cb wolfSSL_CTX_sess_set_new_cb
|
---|
| 449 | #define SSL_CTX_sess_set_remove_cb wolfSSL_CTX_sess_set_remove_cb
|
---|
| 450 |
|
---|
| 451 | #define i2d_SSL_SESSION wolfSSL_i2d_SSL_SESSION
|
---|
| 452 | #define d2i_SSL_SESSION wolfSSL_d2i_SSL_SESSION
|
---|
| 453 | #define SSL_SESSION_set_timeout wolfSSL_SSL_SESSION_set_timeout
|
---|
| 454 | #define SSL_SESSION_get_timeout wolfSSL_SESSION_get_timeout
|
---|
| 455 | #define SSL_SESSION_get_time wolfSSL_SESSION_get_time
|
---|
| 456 | #define SSL_CTX_get_ex_new_index wolfSSL_CTX_get_ex_new_index
|
---|
| 457 | #define PEM_read_bio_X509 wolfSSL_PEM_read_bio_X509
|
---|
| 458 | #define PEM_read_bio_X509_AUX wolfSSL_PEM_read_bio_X509_AUX
|
---|
| 459 |
|
---|
| 460 | /*#if OPENSSL_API_COMPAT < 0x10100000L*/
|
---|
| 461 | #define CONF_modules_free()
|
---|
| 462 | #define ENGINE_cleanup()
|
---|
| 463 | #define HMAC_CTX_cleanup wolfSSL_HMAC_cleanup
|
---|
| 464 | #define SSL_CTX_need_tmp_RSA(ctx) 0
|
---|
| 465 | #define SSL_CTX_set_tmp_rsa(ctx,rsa) 1
|
---|
| 466 | #define SSL_need_tmp_RSA(ssl) 0
|
---|
| 467 | #define SSL_set_tmp_rsa(ssl,rsa) 1
|
---|
| 468 | /*#endif*/
|
---|
| 469 | #define CONF_modules_unload(a)
|
---|
| 470 |
|
---|
| 471 | #define SSL_get_hit wolfSSL_session_reused
|
---|
| 472 |
|
---|
| 473 | /* yassl had set the default to be 500 */
|
---|
| 474 | #define SSL_get_default_timeout(ctx) 500
|
---|
| 475 |
|
---|
| 476 | /* Lighthttp compatibility */
|
---|
| 477 |
|
---|
| 478 | #if defined(HAVE_LIGHTY) || defined(WOLFSSL_MYSQL_COMPATIBLE) || \
|
---|
| 479 | defined(HAVE_STUNNEL) || defined(WOLFSSL_NGINX) || \
|
---|
| 480 | defined(HAVE_POCO_LIB) || defined(WOLFSSL_HAPROXY)
|
---|
| 481 | typedef WOLFSSL_X509_NAME_ENTRY X509_NAME_ENTRY;
|
---|
| 482 |
|
---|
| 483 | #define X509_NAME_free wolfSSL_X509_NAME_free
|
---|
| 484 | #define SSL_CTX_use_certificate wolfSSL_CTX_use_certificate
|
---|
| 485 | #define SSL_CTX_use_PrivateKey wolfSSL_CTX_use_PrivateKey
|
---|
| 486 | #define BIO_read_filename wolfSSL_BIO_read_filename
|
---|
| 487 | #define BIO_s_file wolfSSL_BIO_s_file
|
---|
| 488 | #define OBJ_nid2sn wolfSSL_OBJ_nid2sn
|
---|
| 489 | #define OBJ_obj2nid wolfSSL_OBJ_obj2nid
|
---|
| 490 | #define OBJ_sn2nid wolfSSL_OBJ_sn2nid
|
---|
| 491 | #define SSL_CTX_set_verify_depth wolfSSL_CTX_set_verify_depth
|
---|
| 492 | #define SSL_set_verify_depth wolfSSL_set_verify_depth
|
---|
| 493 | #define SSL_get_app_data wolfSSL_get_app_data
|
---|
| 494 | #define SSL_set_app_data wolfSSL_set_app_data
|
---|
| 495 | #define X509_NAME_entry_count wolfSSL_X509_NAME_entry_count
|
---|
| 496 | #define X509_NAME_ENTRY_get_object wolfSSL_X509_NAME_ENTRY_get_object
|
---|
| 497 | #define X509_NAME_get_entry wolfSSL_X509_NAME_get_entry
|
---|
| 498 | #define ASN1_STRING_data wolfSSL_ASN1_STRING_data
|
---|
| 499 | #define ASN1_STRING_length wolfSSL_ASN1_STRING_length
|
---|
| 500 | #define X509_NAME_get_index_by_NID wolfSSL_X509_NAME_get_index_by_NID
|
---|
| 501 | #define X509_NAME_ENTRY_get_data wolfSSL_X509_NAME_ENTRY_get_data
|
---|
| 502 | #define sk_X509_NAME_pop_free wolfSSL_sk_X509_NAME_pop_free
|
---|
| 503 | #define SHA1 wolfSSL_SHA1
|
---|
| 504 | #define X509_check_private_key wolfSSL_X509_check_private_key
|
---|
| 505 | #define SSL_dup_CA_list wolfSSL_dup_CA_list
|
---|
| 506 |
|
---|
| 507 | #define NID_commonName 0x03 /* matchs ASN_COMMON_NAME in asn.h */
|
---|
| 508 |
|
---|
| 509 | #define OBJ_nid2ln wolfSSL_OBJ_nid2ln
|
---|
| 510 | #define OBJ_txt2nid wolfSSL_OBJ_txt2nid
|
---|
| 511 | #define PEM_read_bio_DHparams wolfSSL_PEM_read_bio_DHparams
|
---|
| 512 | #define PEM_read_bio_DSAparams wolfSSL_PEM_read_bio_DSAparams
|
---|
| 513 | #define PEM_write_bio_X509 wolfSSL_PEM_write_bio_X509
|
---|
| 514 |
|
---|
| 515 |
|
---|
| 516 | #ifdef WOLFSSL_HAPROXY
|
---|
| 517 | #define SSL_get_rbio wolfSSL_SSL_get_rbio
|
---|
| 518 | #define SSL_get_wbio wolfSSL_SSL_get_wbio
|
---|
| 519 | #define SSL_do_handshake wolfSSL_SSL_do_handshake
|
---|
| 520 | #define SSL_get_ciphers(x) wolfSSL_get_ciphers_compat(x)
|
---|
| 521 | #define SSL_SESSION_get_id wolfSSL_SESSION_get_id
|
---|
| 522 | #define ASN1_STRING_get0_data wolfSSL_ASN1_STRING_data
|
---|
| 523 | #define SSL_get_cipher_bits(s,np) wolfSSL_CIPHER_get_bits(SSL_get_current_cipher(s),np)
|
---|
| 524 | #define sk_SSL_CIPHER_num wolfSSL_sk_SSL_CIPHER_num
|
---|
| 525 | #define sk_SSL_COMP_zero wolfSSL_sk_SSL_COMP_zero
|
---|
| 526 | #define sk_SSL_CIPHER_value wolfSSL_sk_SSL_CIPHER_value
|
---|
| 527 | #endif /* WOLFSSL_HAPROXY */
|
---|
| 528 | #endif /* HAVE_STUNNEL || HAVE_LIGHTY || WOLFSSL_MYSQL_COMPATIBLE || WOLFSSL_NGINX || HAVE_POCO_LIB || WOLFSSL_HAPROXY */
|
---|
| 529 |
|
---|
| 530 | #define SSL_CTX_set_tmp_dh wolfSSL_CTX_set_tmp_dh
|
---|
| 531 |
|
---|
| 532 | #define BIO_new_file wolfSSL_BIO_new_file
|
---|
| 533 | #define BIO_ctrl wolfSSL_BIO_ctrl
|
---|
| 534 | #define BIO_ctrl_pending wolfSSL_BIO_ctrl_pending
|
---|
| 535 | #define BIO_get_mem_ptr wolfSSL_BIO_get_mem_ptr
|
---|
| 536 | #define BIO_int_ctrl wolfSSL_BIO_int_ctrl
|
---|
| 537 | #define BIO_reset wolfSSL_BIO_reset
|
---|
| 538 | #define BIO_s_file wolfSSL_BIO_s_file
|
---|
| 539 | #define BIO_s_bio wolfSSL_BIO_s_bio
|
---|
| 540 | #define BIO_s_socket wolfSSL_BIO_s_socket
|
---|
| 541 | #define BIO_set_fd wolfSSL_BIO_set_fd
|
---|
| 542 | #define BIO_ctrl_reset_read_request wolfSSL_BIO_ctrl_reset_read_request
|
---|
| 543 |
|
---|
| 544 | #define BIO_set_write_buf_size wolfSSL_BIO_set_write_buf_size
|
---|
| 545 | #define BIO_make_bio_pair wolfSSL_BIO_make_bio_pair
|
---|
| 546 |
|
---|
| 547 | #define BIO_set_fp wolfSSL_BIO_set_fp
|
---|
| 548 | #define BIO_get_fp wolfSSL_BIO_get_fp
|
---|
| 549 | #define BIO_seek wolfSSL_BIO_seek
|
---|
| 550 | #define BIO_write_filename wolfSSL_BIO_write_filename
|
---|
| 551 | #define BIO_set_mem_eof_return wolfSSL_BIO_set_mem_eof_return
|
---|
| 552 |
|
---|
| 553 | #define SSL_set_options wolfSSL_set_options
|
---|
| 554 | #define SSL_get_options wolfSSL_get_options
|
---|
| 555 | #define SSL_set_tmp_dh wolfSSL_set_tmp_dh
|
---|
| 556 | #define SSL_clear_num_renegotiations wolfSSL_clear_num_renegotiations
|
---|
| 557 | #define SSL_total_renegotiations wolfSSL_total_renegotiations
|
---|
| 558 | #define SSL_set_tlsext_debug_arg wolfSSL_set_tlsext_debug_arg
|
---|
| 559 | #define SSL_set_tlsext_status_type wolfSSL_set_tlsext_status_type
|
---|
| 560 | #define SSL_set_tlsext_status_exts wolfSSL_set_tlsext_status_exts
|
---|
| 561 | #define SSL_get_tlsext_status_ids wolfSSL_get_tlsext_status_ids
|
---|
| 562 | #define SSL_set_tlsext_status_ids wolfSSL_set_tlsext_status_ids
|
---|
| 563 | #define SSL_get_tlsext_status_ocsp_resp wolfSSL_get_tlsext_status_ocsp_resp
|
---|
| 564 | #define SSL_set_tlsext_status_ocsp_resp wolfSSL_set_tlsext_status_ocsp_resp
|
---|
| 565 |
|
---|
| 566 | #define SSL_CTX_add_extra_chain_cert wolfSSL_CTX_add_extra_chain_cert
|
---|
| 567 | #define SSL_CTX_get_read_ahead wolfSSL_CTX_get_read_ahead
|
---|
| 568 | #define SSL_CTX_set_read_ahead wolfSSL_CTX_set_read_ahead
|
---|
| 569 | #define SSL_CTX_set_tlsext_status_arg wolfSSL_CTX_set_tlsext_status_arg
|
---|
| 570 | #define SSL_CTX_set_tlsext_opaque_prf_input_callback_arg \
|
---|
| 571 | wolfSSL_CTX_set_tlsext_opaque_prf_input_callback_arg
|
---|
| 572 | #define SSL_get_server_random wolfSSL_get_server_random
|
---|
| 573 |
|
---|
| 574 | #define SSL_get_tlsext_status_exts wolfSSL_get_tlsext_status_exts
|
---|
| 575 |
|
---|
| 576 | #define BIO_C_SET_FILE_PTR 106
|
---|
| 577 | #define BIO_C_GET_FILE_PTR 107
|
---|
| 578 | #define BIO_C_SET_FILENAME 108
|
---|
| 579 | #define BIO_C_FILE_SEEK 128
|
---|
| 580 | #define BIO_C_SET_BUF_MEM_EOF_RETURN 130
|
---|
| 581 | #define BIO_C_SET_WRITE_BUF_SIZE 136
|
---|
| 582 | #define BIO_C_MAKE_BIO_PAIR 138
|
---|
| 583 |
|
---|
| 584 | #define BIO_CTRL_RESET 1
|
---|
| 585 | #define BIO_CTRL_INFO 3
|
---|
| 586 | #define BIO_CTRL_FLUSH 11
|
---|
| 587 | #define BIO_CLOSE 0x01
|
---|
| 588 | #define BIO_FP_WRITE 0x04
|
---|
| 589 |
|
---|
| 590 | #define SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS 11
|
---|
| 591 | #define SSL_CTRL_GET_TOTAL_RENEGOTIATIONS 12
|
---|
| 592 | #define SSL_CTRL_SET_TMP_DH 3
|
---|
| 593 | #define SSL_CTRL_SET_TLSEXT_DEBUG_ARG 57
|
---|
| 594 | #define SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE 65
|
---|
| 595 | #define SSL_CTRL_GET_TLSEXT_STATUS_REQ_EXTS 66
|
---|
| 596 | #define SSL_CTRL_SET_TLSEXT_STATUS_REQ_EXTS 67
|
---|
| 597 | #define SSL_CTRL_GET_TLSEXT_STATUS_REQ_IDS 68
|
---|
| 598 | #define SSL_CTRL_SET_TLSEXT_STATUS_REQ_IDS 69
|
---|
| 599 | #define SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP 70
|
---|
| 600 | #define SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP 71
|
---|
| 601 |
|
---|
| 602 | #define SSL_CTRL_SET_TMP_DH 3
|
---|
| 603 | #define SSL_CTRL_EXTRA_CHAIN_CERT 14
|
---|
| 604 |
|
---|
| 605 | #define SSL_CTRL_SET_SESS_CACHE_SIZE 42
|
---|
| 606 | #define SSL_CTRL_GET_READ_AHEAD 40
|
---|
| 607 | #define SSL_CTRL_SET_READ_AHEAD 41
|
---|
| 608 |
|
---|
| 609 | #define SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB 63
|
---|
| 610 | #define SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG 64
|
---|
| 611 |
|
---|
| 612 | #define SSL_CTRL_GET_EXTRA_CHAIN_CERTS 82
|
---|
| 613 |
|
---|
| 614 | #define SSL_ctrl wolfSSL_ctrl
|
---|
| 615 | #define SSL_CTX_ctrl wolfSSL_CTX_ctrl
|
---|
| 616 |
|
---|
| 617 | #define X509_V_FLAG_CRL_CHECK WOLFSSL_CRL_CHECK
|
---|
| 618 | #define X509_V_FLAG_CRL_CHECK_ALL WOLFSSL_CRL_CHECKALL
|
---|
| 619 |
|
---|
| 620 | #if defined(HAVE_STUNNEL) || defined(WOLFSSL_NGINX)
|
---|
| 621 | #include <wolfssl/openssl/asn1.h>
|
---|
| 622 |
|
---|
| 623 | #define SSL2_VERSION 0x0002
|
---|
| 624 | #define SSL3_VERSION 0x0300
|
---|
| 625 | #define TLS1_VERSION 0x0301
|
---|
| 626 | #define DTLS1_VERSION 0xFEFF
|
---|
| 627 | #define SSL23_ST_SR_CLNT_HELLO_A (0x210|0x2000)
|
---|
| 628 | #define SSL3_ST_SR_CLNT_HELLO_A (0x110|0x2000)
|
---|
| 629 | #define ASN1_STRFLGS_ESC_MSB 4
|
---|
| 630 | #define X509_V_ERR_CERT_REJECTED 28
|
---|
| 631 |
|
---|
| 632 | #define SSL_MAX_MASTER_KEY_LENGTH WOLFSSL_MAX_MASTER_KEY_LENGTH
|
---|
| 633 |
|
---|
| 634 | #define SSL_alert_desc_string_long wolfSSL_alert_desc_string_long
|
---|
| 635 | #define SSL_alert_type_string_long wolfSSL_alert_type_string_long
|
---|
| 636 | #define SSL_CIPHER_get_bits wolfSSL_CIPHER_get_bits
|
---|
| 637 | #define sk_X509_NAME_num wolfSSL_sk_X509_NAME_num
|
---|
| 638 | #define sk_X509_num wolfSSL_sk_X509_num
|
---|
| 639 | #define X509_NAME_print_ex wolfSSL_X509_NAME_print_ex
|
---|
| 640 | #define X509_get0_pubkey_bitstr wolfSSL_X509_get0_pubkey_bitstr
|
---|
| 641 | #define SSL_CTX_get_options wolfSSL_CTX_get_options
|
---|
| 642 |
|
---|
| 643 | #define SSL_CTX_flush_sessions wolfSSL_flush_sessions
|
---|
| 644 | #define SSL_CTX_add_session wolfSSL_CTX_add_session
|
---|
| 645 | #define SSL_get_SSL_CTX wolfSSL_get_SSL_CTX
|
---|
| 646 | #define SSL_version wolfSSL_version
|
---|
| 647 | #define SSL_get_state wolfSSL_get_state
|
---|
| 648 | #define SSL_state_string_long wolfSSL_state_string_long
|
---|
| 649 | #define SSL_get_peer_cert_chain wolfSSL_get_peer_cert_chain
|
---|
| 650 | #define sk_X509_NAME_value wolfSSL_sk_X509_NAME_value
|
---|
| 651 | #define sk_X509_value wolfSSL_sk_X509_value
|
---|
| 652 | #define SSL_SESSION_get_ex_data wolfSSL_SESSION_get_ex_data
|
---|
| 653 | #define SSL_SESSION_set_ex_data wolfSSL_SESSION_set_ex_data
|
---|
| 654 | #define SSL_SESSION_get_ex_new_index wolfSSL_SESSION_get_ex_new_index
|
---|
| 655 | #define SSL_SESSION_get_id wolfSSL_SESSION_get_id
|
---|
| 656 | #define CRYPTO_dynlock_value WOLFSSL_dynlock_value
|
---|
| 657 | typedef WOLFSSL_ASN1_BIT_STRING ASN1_BIT_STRING;
|
---|
| 658 | #define X509_STORE_get1_certs wolfSSL_X509_STORE_get1_certs
|
---|
| 659 | #define sk_X509_pop_free wolfSSL_sk_X509_pop_free
|
---|
| 660 |
|
---|
| 661 | #define SSL_TLSEXT_ERR_OK 0
|
---|
| 662 | #define SSL_TLSEXT_ERR_ALERT_FATAL alert_fatal
|
---|
| 663 | #define SSL_TLSEXT_ERR_NOACK alert_warning
|
---|
| 664 | #define TLSEXT_NAMETYPE_host_name WOLFSSL_SNI_HOST_NAME
|
---|
| 665 |
|
---|
| 666 | #define SSL_set_tlsext_host_name wolfSSL_set_tlsext_host_name
|
---|
| 667 | #define SSL_get_servername wolfSSL_get_servername
|
---|
| 668 | #define SSL_set_SSL_CTX wolfSSL_set_SSL_CTX
|
---|
| 669 | #define SSL_CTX_get_verify_callback wolfSSL_CTX_get_verify_callback
|
---|
| 670 | #define SSL_CTX_set_tlsext_servername_callback wolfSSL_CTX_set_tlsext_servername_callback
|
---|
| 671 | #define SSL_CTX_set_tlsext_servername_arg wolfSSL_CTX_set_servername_arg
|
---|
| 672 |
|
---|
| 673 | #define PSK_MAX_PSK_LEN 256
|
---|
| 674 | #define PSK_MAX_IDENTITY_LEN 128
|
---|
| 675 | #define ERR_remove_thread_state WOLFSSL_ERR_remove_thread_state
|
---|
| 676 | #define SSL_CTX_clear_options wolfSSL_CTX_clear_options
|
---|
| 677 |
|
---|
| 678 |
|
---|
| 679 | #endif /* HAVE_STUNNEL || WOLFSSL_NGINX */
|
---|
| 680 | #define SSL_CTX_get_default_passwd_cb wolfSSL_CTX_get_default_passwd_cb
|
---|
| 681 | #define SSL_CTX_get_default_passwd_cb_userdata wolfSSL_CTX_get_default_passwd_cb_userdata
|
---|
| 682 |
|
---|
| 683 | /* certificate extension NIDs */
|
---|
| 684 | #define NID_basic_constraints 133
|
---|
| 685 | #define NID_key_usage 129 /* 2.5.29.15 */
|
---|
| 686 | #define NID_ext_key_usage 151 /* 2.5.29.37 */
|
---|
| 687 | #define NID_subject_key_identifier 128
|
---|
| 688 | #define NID_authority_key_identifier 149
|
---|
| 689 | #define NID_private_key_usage_period 130 /* 2.5.29.16 */
|
---|
| 690 | #define NID_subject_alt_name 131
|
---|
| 691 | #define NID_issuer_alt_name 132
|
---|
| 692 | #define NID_info_access 69
|
---|
| 693 | #define NID_sinfo_access 79 /* id-pe 11 */
|
---|
| 694 | #define NID_name_constraints 144 /* 2.5.29.30 */
|
---|
| 695 | #define NID_certificate_policies 146
|
---|
| 696 | #define NID_policy_mappings 147
|
---|
| 697 | #define NID_policy_constraints 150
|
---|
| 698 | #define NID_inhibit_any_policy 168 /* 2.5.29.54 */
|
---|
| 699 | #define NID_tlsfeature 92 /* id-pe 24 */
|
---|
| 700 |
|
---|
| 701 |
|
---|
| 702 | #define SSL_CTX_set_msg_callback wolfSSL_CTX_set_msg_callback
|
---|
| 703 | #define SSL_set_msg_callback wolfSSL_set_msg_callback
|
---|
| 704 | #define SSL_CTX_set_msg_callback_arg wolfSSL_CTX_set_msg_callback_arg
|
---|
| 705 | #define SSL_set_msg_callback_arg wolfSSL_set_msg_callback_arg
|
---|
| 706 |
|
---|
| 707 | /* certificate extension NIDs */
|
---|
| 708 | #define NID_basic_constraints 133
|
---|
| 709 | #define NID_key_usage 129 /* 2.5.29.15 */
|
---|
| 710 | #define NID_ext_key_usage 151 /* 2.5.29.37 */
|
---|
| 711 | #define NID_subject_key_identifier 128
|
---|
| 712 | #define NID_authority_key_identifier 149
|
---|
| 713 | #define NID_private_key_usage_period 130 /* 2.5.29.16 */
|
---|
| 714 | #define NID_subject_alt_name 131
|
---|
| 715 | #define NID_issuer_alt_name 132
|
---|
| 716 | #define NID_info_access 69
|
---|
| 717 | #define NID_sinfo_access 79 /* id-pe 11 */
|
---|
| 718 | #define NID_name_constraints 144 /* 2.5.29.30 */
|
---|
| 719 | #define NID_certificate_policies 146
|
---|
| 720 | #define NID_policy_mappings 147
|
---|
| 721 | #define NID_policy_constraints 150
|
---|
| 722 | #define NID_inhibit_any_policy 168 /* 2.5.29.54 */
|
---|
| 723 | #define NID_tlsfeature 92 /* id-pe 24 */
|
---|
| 724 |
|
---|
| 725 |
|
---|
| 726 | #if defined(WOLFSSL_NGINX) || defined(WOLFSSL_HAPROXY) || \
|
---|
| 727 | defined(WOLFSSL_MYSQL_COMPATIBLE)
|
---|
| 728 |
|
---|
| 729 | #include <wolfssl/error-ssl.h>
|
---|
| 730 |
|
---|
| 731 | #define OPENSSL_STRING WOLFSSL_STRING
|
---|
| 732 |
|
---|
| 733 | #define TLSEXT_TYPE_application_layer_protocol_negotiation 16
|
---|
| 734 |
|
---|
| 735 | #define OPENSSL_NPN_UNSUPPORTED 0
|
---|
| 736 | #define OPENSSL_NPN_NEGOTIATED 1
|
---|
| 737 | #define OPENSSL_NPN_NO_OVERLAP 2
|
---|
| 738 |
|
---|
| 739 | /* Nginx checks these to see if the error was a handshake error. */
|
---|
| 740 | #define SSL_R_BAD_CHANGE_CIPHER_SPEC LENGTH_ERROR
|
---|
| 741 | #define SSL_R_BLOCK_CIPHER_PAD_IS_WRONG BUFFER_E
|
---|
| 742 | #define SSL_R_DIGEST_CHECK_FAILED VERIFY_MAC_ERROR
|
---|
| 743 | #define SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST SUITES_ERROR
|
---|
| 744 | #define SSL_R_EXCESSIVE_MESSAGE_SIZE BUFFER_ERROR
|
---|
| 745 | #define SSL_R_LENGTH_MISMATCH LENGTH_ERROR
|
---|
| 746 | #define SSL_R_NO_CIPHERS_SPECIFIED SUITES_ERROR
|
---|
| 747 | #define SSL_R_NO_COMPRESSION_SPECIFIED COMPRESSION_ERROR
|
---|
| 748 | #define SSL_R_NO_SHARED_CIPHER MATCH_SUITE_ERROR
|
---|
| 749 | #define SSL_R_RECORD_LENGTH_MISMATCH HANDSHAKE_SIZE_ERROR
|
---|
| 750 | #define SSL_R_UNEXPECTED_MESSAGE OUT_OF_ORDER_E
|
---|
| 751 | #define SSL_R_UNEXPECTED_RECORD SANITY_MSG_E
|
---|
| 752 | #define SSL_R_UNKNOWN_ALERT_TYPE BUFFER_ERROR
|
---|
| 753 | #define SSL_R_UNKNOWN_PROTOCOL VERSION_ERROR
|
---|
| 754 | #define SSL_R_WRONG_VERSION_NUMBER VERSION_ERROR
|
---|
| 755 | #define SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC ENCRYPT_ERROR
|
---|
| 756 |
|
---|
| 757 | /* Nginx uses this to determine if reached end of certs in file.
|
---|
| 758 | * PEM_read_bio_X509 is called and the return error is lost.
|
---|
| 759 | * The error that needs to be detected is: SSL_NO_PEM_HEADER.
|
---|
| 760 | */
|
---|
| 761 | #define ERR_GET_LIB(l) (int)((((unsigned long)l)>>24L)&0xffL)
|
---|
| 762 | #define PEM_R_NO_START_LINE 108
|
---|
| 763 | #define ERR_LIB_PEM 9
|
---|
| 764 |
|
---|
| 765 | #ifdef HAVE_SESSION_TICKET
|
---|
| 766 | #define SSL_OP_NO_TICKET SSL_OP_NO_TICKET
|
---|
| 767 | #define SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB 72
|
---|
| 768 | #endif
|
---|
| 769 |
|
---|
| 770 | #define OPENSSL_config wolfSSL_OPENSSL_config
|
---|
| 771 | #define X509_get_ex_new_index wolfSSL_X509_get_ex_new_index
|
---|
| 772 | #define X509_get_ex_data wolfSSL_X509_get_ex_data
|
---|
| 773 | #define X509_set_ex_data wolfSSL_X509_set_ex_data
|
---|
| 774 | #define X509_NAME_digest wolfSSL_X509_NAME_digest
|
---|
| 775 | #define SSL_CTX_get_timeout wolfSSL_SSL_CTX_get_timeout
|
---|
| 776 | #define SSL_CTX_set_tmp_ecdh wolfSSL_SSL_CTX_set_tmp_ecdh
|
---|
| 777 | #define SSL_CTX_remove_session wolfSSL_SSL_CTX_remove_session
|
---|
| 778 | #define SSL_get_rbio wolfSSL_SSL_get_rbio
|
---|
| 779 | #define SSL_get_wbio wolfSSL_SSL_get_wbio
|
---|
| 780 | #define SSL_do_handshake wolfSSL_SSL_do_handshake
|
---|
| 781 | #define SSL_in_init wolfSSL_SSL_in_init
|
---|
| 782 | #define SSL_get0_session wolfSSL_SSL_get0_session
|
---|
| 783 | #define X509_check_host wolfSSL_X509_check_host
|
---|
| 784 | #define i2a_ASN1_INTEGER wolfSSL_i2a_ASN1_INTEGER
|
---|
| 785 | #define ERR_peek_error_line_data wolfSSL_ERR_peek_error_line_data
|
---|
| 786 | #define SSL_CTX_set_tlsext_ticket_key_cb wolfSSL_CTX_set_tlsext_ticket_key_cb
|
---|
| 787 | #define X509_email_free wolfSSL_X509_email_free
|
---|
| 788 | #define X509_get1_ocsp wolfSSL_X509_get1_ocsp
|
---|
| 789 | #define SSL_CTX_set_tlsext_status_cb wolfSSL_CTX_set_tlsext_status_cb
|
---|
| 790 | #define X509_check_issued wolfSSL_X509_check_issued
|
---|
| 791 | #define X509_dup wolfSSL_X509_dup
|
---|
| 792 | #define X509_STORE_CTX_new wolfSSL_X509_STORE_CTX_new
|
---|
| 793 | #define X509_STORE_CTX_free wolfSSL_X509_STORE_CTX_free
|
---|
| 794 | #define SSL_CTX_get_extra_chain_certs wolfSSL_CTX_get_extra_chain_certs
|
---|
| 795 | #define X509_STORE_CTX_get1_issuer wolfSSL_X509_STORE_CTX_get1_issuer
|
---|
| 796 | #define sk_OPENSSL_STRING_value wolfSSL_sk_WOLFSSL_STRING_value
|
---|
| 797 | #define SSL_get0_alpn_selected wolfSSL_get0_alpn_selected
|
---|
| 798 | #define SSL_select_next_proto wolfSSL_select_next_proto
|
---|
| 799 | #define SSL_CTX_set_alpn_select_cb wolfSSL_CTX_set_alpn_select_cb
|
---|
| 800 | #define SSL_CTX_set_next_protos_advertised_cb wolfSSL_CTX_set_next_protos_advertised_cb
|
---|
| 801 | #define SSL_CTX_set_next_proto_select_cb wolfSSL_CTX_set_next_proto_select_cb
|
---|
| 802 | #define SSL_get0_next_proto_negotiated wolfSSL_get0_next_proto_negotiated
|
---|
| 803 | #define SSL_is_server wolfSSL_is_server
|
---|
| 804 | #define SSL_CTX_set1_curves_list wolfSSL_CTX_set1_curves_list
|
---|
| 805 |
|
---|
| 806 | #endif /* WOLFSSL_NGINX || WOLFSSL_HAPROXY */
|
---|
| 807 |
|
---|
| 808 | #ifdef __cplusplus
|
---|
| 809 | } /* extern "C" */
|
---|
| 810 | #endif
|
---|
| 811 |
|
---|
| 812 |
|
---|
| 813 | #endif /* wolfSSL_openssl_h__ */
|
---|