openssl.h
Go to the documentation of this file.
00001 #ifndef HEADER_CURL_SSLUSE_H
00002 #define HEADER_CURL_SSLUSE_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 
00025 #include "curl_setup.h"
00026 
00027 #ifdef USE_OPENSSL
00028 /*
00029  * This header should only be needed to get included by vtls.c and openssl.c
00030  */
00031 
00032 #include "urldata.h"
00033 
00034 CURLcode Curl_ossl_connect(struct connectdata *conn, int sockindex);
00035 CURLcode Curl_ossl_connect_nonblocking(struct connectdata *conn,
00036                                        int sockindex,
00037                                        bool *done);
00038 
00039 /* close a SSL connection */
00040 void Curl_ossl_close(struct connectdata *conn, int sockindex);
00041 
00042 /* tell OpenSSL to close down all open information regarding connections (and
00043    thus session ID caching etc) */
00044 void Curl_ossl_close_all(struct Curl_easy *data);
00045 
00046 /* Sets an OpenSSL engine */
00047 CURLcode Curl_ossl_set_engine(struct Curl_easy *data, const char *engine);
00048 
00049 /* function provided for the generic SSL-layer, called when a session id
00050    should be freed */
00051 void Curl_ossl_session_free(void *ptr);
00052 
00053 /* Sets engine as default for all SSL operations */
00054 CURLcode Curl_ossl_set_engine_default(struct Curl_easy *data);
00055 
00056 /* Build list of OpenSSL engines */
00057 struct curl_slist *Curl_ossl_engines_list(struct Curl_easy *data);
00058 
00059 int Curl_ossl_init(void);
00060 void Curl_ossl_cleanup(void);
00061 
00062 size_t Curl_ossl_version(char *buffer, size_t size);
00063 int Curl_ossl_check_cxn(struct connectdata *cxn);
00064 int Curl_ossl_shutdown(struct connectdata *conn, int sockindex);
00065 bool Curl_ossl_data_pending(const struct connectdata *conn,
00066                             int connindex);
00067 
00068 /* return 0 if a find random is filled in */
00069 int Curl_ossl_random(struct Curl_easy *data, unsigned char *entropy,
00070                      size_t length);
00071 void Curl_ossl_md5sum(unsigned char *tmp, /* input */
00072                       size_t tmplen,
00073                       unsigned char *md5sum /* output */,
00074                       size_t unused);
00075 void Curl_ossl_sha256sum(const unsigned char *tmp, /* input */
00076                       size_t tmplen,
00077                       unsigned char *sha256sum /* output */,
00078                       size_t unused);
00079 
00080 bool Curl_ossl_cert_status_request(void);
00081 
00082 /* Support HTTPS-proxy */
00083 #define HTTPS_PROXY_SUPPORT 1
00084 
00085 /* Set the API backend definition to OpenSSL */
00086 #define CURL_SSL_BACKEND CURLSSLBACKEND_OPENSSL
00087 
00088 /* this backend supports the CAPATH option */
00089 #define have_curlssl_ca_path 1
00090 
00091 /* this backend supports CURLOPT_CERTINFO */
00092 #define have_curlssl_certinfo 1
00093 
00094 /* this backend supports CURLOPT_SSL_CTX_* */
00095 #define have_curlssl_ssl_ctx 1
00096 
00097 /* this backend supports CURLOPT_PINNEDPUBLICKEY */
00098 #define have_curlssl_pinnedpubkey 1
00099 
00100 /* API setup for OpenSSL */
00101 #define curlssl_init Curl_ossl_init
00102 #define curlssl_cleanup Curl_ossl_cleanup
00103 #define curlssl_connect Curl_ossl_connect
00104 #define curlssl_connect_nonblocking Curl_ossl_connect_nonblocking
00105 #define curlssl_session_free(x) Curl_ossl_session_free(x)
00106 #define curlssl_close_all Curl_ossl_close_all
00107 #define curlssl_close Curl_ossl_close
00108 #define curlssl_shutdown(x,y) Curl_ossl_shutdown(x,y)
00109 #define curlssl_set_engine(x,y) Curl_ossl_set_engine(x,y)
00110 #define curlssl_set_engine_default(x) Curl_ossl_set_engine_default(x)
00111 #define curlssl_engines_list(x) Curl_ossl_engines_list(x)
00112 #define curlssl_version Curl_ossl_version
00113 #define curlssl_check_cxn Curl_ossl_check_cxn
00114 #define curlssl_data_pending(x,y) Curl_ossl_data_pending(x,y)
00115 #define curlssl_random(x,y,z) Curl_ossl_random(x,y,z)
00116 #define curlssl_md5sum(a,b,c,d) Curl_ossl_md5sum(a,b,c,d)
00117 #if (OPENSSL_VERSION_NUMBER >= 0x0090800fL) && !defined(OPENSSL_NO_SHA256)
00118 #define curlssl_sha256sum(a,b,c,d) Curl_ossl_sha256sum(a,b,c,d)
00119 #endif
00120 #define curlssl_cert_status_request() Curl_ossl_cert_status_request()
00121 
00122 #define DEFAULT_CIPHER_SELECTION \
00123   "ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH"
00124 
00125 #endif /* USE_OPENSSL */
00126 #endif /* HEADER_CURL_SSLUSE_H */


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