cyassl.h
Go to the documentation of this file.
00001 #ifndef HEADER_CURL_CYASSL_H
00002 #define HEADER_CURL_CYASSL_H
00003 /***************************************************************************
00004  *                                  _   _ ____  _
00005  *  Project                     ___| | | |  _ \| |
00006  *                             / __| | | | |_) | |
00007  *                            | (__| |_| |  _ <| |___
00008  *                             \___|\___/|_| \_\_____|
00009  *
00010  * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
00011  *
00012  * This software is licensed as described in the file COPYING, which
00013  * you should have received as part of this distribution. The terms
00014  * are also available at https://curl.haxx.se/docs/copyright.html.
00015  *
00016  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
00017  * copies of the Software, and permit persons to whom the Software is
00018  * furnished to do so, under the terms of the COPYING file.
00019  *
00020  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
00021  * KIND, either express or implied.
00022  *
00023  ***************************************************************************/
00024 #include "curl_setup.h"
00025 
00026 #ifdef USE_CYASSL
00027 
00028 /* KEEP_PEER_CERT is a product of the presence of build time symbol
00029    OPENSSL_EXTRA without NO_CERTS, depending on the version. KEEP_PEER_CERT is
00030    in wolfSSL's settings.h, and the latter two are build time symbols in
00031    options.h. */
00032 #ifndef KEEP_PEER_CERT
00033 #if defined(HAVE_CYASSL_GET_PEER_CERTIFICATE) || \
00034     defined(HAVE_WOLFSSL_GET_PEER_CERTIFICATE) || \
00035     (defined(OPENSSL_EXTRA) && !defined(NO_CERTS))
00036 #define KEEP_PEER_CERT
00037 #endif
00038 #endif
00039 
00040 CURLcode Curl_cyassl_connect(struct connectdata *conn, int sockindex);
00041 bool Curl_cyassl_data_pending(const struct connectdata* conn, int connindex);
00042 int Curl_cyassl_shutdown(struct connectdata* conn, int sockindex);
00043 
00044  /* close a SSL connection */
00045 void Curl_cyassl_close(struct connectdata *conn, int sockindex);
00046 
00047 void Curl_cyassl_session_free(void *ptr);
00048 size_t Curl_cyassl_version(char *buffer, size_t size);
00049 int Curl_cyassl_shutdown(struct connectdata *conn, int sockindex);
00050 int Curl_cyassl_init(void);
00051 CURLcode Curl_cyassl_connect_nonblocking(struct connectdata *conn,
00052                                          int sockindex,
00053                                          bool *done);
00054 int Curl_cyassl_random(struct Curl_easy *data,
00055                        unsigned char *entropy,
00056                        size_t length);
00057 void Curl_cyassl_sha256sum(const unsigned char *tmp, /* input */
00058                      size_t tmplen,
00059                      unsigned char *sha256sum, /* output */
00060                      size_t unused);
00061 
00062 /* Set the API backend definition to Schannel */
00063 #define CURL_SSL_BACKEND CURLSSLBACKEND_CYASSL
00064 
00065 /* this backend supports CURLOPT_SSL_CTX_* */
00066 #define have_curlssl_ssl_ctx 1
00067 
00068 #ifdef KEEP_PEER_CERT
00069 /* this backend supports CURLOPT_PINNEDPUBLICKEY */
00070 #define have_curlssl_pinnedpubkey 1
00071 #endif
00072 
00073 /* API setup for CyaSSL */
00074 #define curlssl_init Curl_cyassl_init
00075 #define curlssl_cleanup() Curl_nop_stmt
00076 #define curlssl_connect Curl_cyassl_connect
00077 #define curlssl_connect_nonblocking Curl_cyassl_connect_nonblocking
00078 #define curlssl_session_free(x)  Curl_cyassl_session_free(x)
00079 #define curlssl_close_all(x) ((void)x)
00080 #define curlssl_close Curl_cyassl_close
00081 #define curlssl_shutdown(x,y) Curl_cyassl_shutdown(x,y)
00082 #define curlssl_set_engine(x,y) ((void)x, (void)y, CURLE_NOT_BUILT_IN)
00083 #define curlssl_set_engine_default(x) ((void)x, CURLE_NOT_BUILT_IN)
00084 #define curlssl_engines_list(x) ((void)x, (struct curl_slist *)NULL)
00085 #define curlssl_version Curl_cyassl_version
00086 #define curlssl_check_cxn(x) ((void)x, -1)
00087 #define curlssl_data_pending(x,y) Curl_cyassl_data_pending(x,y)
00088 #define curlssl_random(x,y,z) Curl_cyassl_random(x,y,z)
00089 #define curlssl_sha256sum(a,b,c,d) Curl_cyassl_sha256sum(a,b,c,d)
00090 
00091 #endif /* USE_CYASSL */
00092 #endif /* HEADER_CURL_CYASSL_H */


rc_visard_driver
Author(s): Heiko Hirschmueller , Christian Emmerich , Felix Ruess
autogenerated on Thu Jun 6 2019 20:43:02