polarssl.h
Go to the documentation of this file.
00001 #ifndef HEADER_CURL_POLARSSL_H
00002 #define HEADER_CURL_POLARSSL_H
00003 /***************************************************************************
00004  *                                  _   _ ____  _
00005  *  Project                     ___| | | |  _ \| |
00006  *                             / __| | | | |_) | |
00007  *                            | (__| |_| |  _ <| |___
00008  *                             \___|\___/|_| \_\_____|
00009  *
00010  * Copyright (C) 2012 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
00011  * Copyright (C) 2010, Hoi-Ho Chan, <hoiho.chan@gmail.com>
00012  *
00013  * This software is licensed as described in the file COPYING, which
00014  * you should have received as part of this distribution. The terms
00015  * are also available at https://curl.haxx.se/docs/copyright.html.
00016  *
00017  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
00018  * copies of the Software, and permit persons to whom the Software is
00019  * furnished to do so, under the terms of the COPYING file.
00020  *
00021  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
00022  * KIND, either express or implied.
00023  *
00024  ***************************************************************************/
00025 #include "curl_setup.h"
00026 
00027 #ifdef USE_POLARSSL
00028 
00029 #include <polarssl/sha256.h>
00030 
00031 /* Called on first use PolarSSL, setup threading if supported */
00032 int  Curl_polarssl_init(void);
00033 void Curl_polarssl_cleanup(void);
00034 
00035 
00036 CURLcode Curl_polarssl_connect(struct connectdata *conn, int sockindex);
00037 
00038 CURLcode Curl_polarssl_connect_nonblocking(struct connectdata *conn,
00039                                            int sockindex,
00040                                            bool *done);
00041 
00042  /* close a SSL connection */
00043 void Curl_polarssl_close(struct connectdata *conn, int sockindex);
00044 
00045 void Curl_polarssl_session_free(void *ptr);
00046 size_t Curl_polarssl_version(char *buffer, size_t size);
00047 int Curl_polarssl_shutdown(struct connectdata *conn, int sockindex);
00048 
00049 /* Set the API backend definition to PolarSSL */
00050 #define CURL_SSL_BACKEND CURLSSLBACKEND_POLARSSL
00051 
00052 /* this backend supports the CAPATH option */
00053 #define have_curlssl_ca_path 1
00054 
00055 /* this backends supports CURLOPT_PINNEDPUBLICKEY */
00056 #define have_curlssl_pinnedpubkey 1
00057 
00058 /* API setup for PolarSSL */
00059 #define curlssl_init() Curl_polarssl_init()
00060 #define curlssl_cleanup() Curl_polarssl_cleanup()
00061 #define curlssl_connect Curl_polarssl_connect
00062 #define curlssl_connect_nonblocking Curl_polarssl_connect_nonblocking
00063 #define curlssl_session_free(x)  Curl_polarssl_session_free(x)
00064 #define curlssl_close_all(x) ((void)x)
00065 #define curlssl_close Curl_polarssl_close
00066 #define curlssl_shutdown(x,y) 0
00067 #define curlssl_set_engine(x,y) ((void)x, (void)y, CURLE_NOT_BUILT_IN)
00068 #define curlssl_set_engine_default(x) ((void)x, CURLE_NOT_BUILT_IN)
00069 #define curlssl_engines_list(x) ((void)x, (struct curl_slist *)NULL)
00070 #define curlssl_version Curl_polarssl_version
00071 #define curlssl_check_cxn(x) ((void)x, -1)
00072 #define curlssl_data_pending(x,y) ((void)x, (void)y, 0)
00073 #define curlssl_sha256sum(a,b,c,d) sha256(a,b,c,0)
00074 
00075 /* This might cause libcurl to use a weeker random!
00076    TODO: implement proper use of Polarssl's CTR-DRBG or HMAC-DRBG and use that
00077 */
00078 #define curlssl_random(x,y,z) ((void)x, (void)y, (void)z, CURLE_NOT_BUILT_IN)
00079 
00080 #endif /* USE_POLARSSL */
00081 #endif /* HEADER_CURL_POLARSSL_H */


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