2011-08-28 05:29:09 -04:00
|
|
|
#ifndef HEADER_CURL_SSLUSE_H
|
|
|
|
#define HEADER_CURL_SSLUSE_H
|
2002-09-03 07:52:59 -04:00
|
|
|
/***************************************************************************
|
2004-12-13 11:43:00 -05:00
|
|
|
* _ _ ____ _
|
|
|
|
* Project ___| | | | _ \| |
|
|
|
|
* / __| | | | |_) | |
|
|
|
|
* | (__| |_| | _ <| |___
|
1999-12-29 09:20:26 -05:00
|
|
|
* \___|\___/|_| \_\_____|
|
|
|
|
*
|
2015-01-17 11:03:49 -05:00
|
|
|
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
|
1999-12-29 09:20:26 -05:00
|
|
|
*
|
2002-09-03 07:52:59 -04:00
|
|
|
* This software is licensed as described in the file COPYING, which
|
|
|
|
* you should have received as part of this distribution. The terms
|
|
|
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
2004-12-13 11:43:00 -05:00
|
|
|
*
|
2001-01-03 04:29:33 -05:00
|
|
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
|
|
|
* copies of the Software, and permit persons to whom the Software is
|
2002-09-03 07:52:59 -04:00
|
|
|
* furnished to do so, under the terms of the COPYING file.
|
1999-12-29 09:20:26 -05:00
|
|
|
*
|
2001-01-03 04:29:33 -05:00
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
1999-12-29 09:20:26 -05:00
|
|
|
*
|
2002-09-03 07:52:59 -04:00
|
|
|
***************************************************************************/
|
2005-04-07 11:27:13 -04:00
|
|
|
|
2013-01-06 13:06:49 -05:00
|
|
|
#include "curl_setup.h"
|
2011-08-28 05:29:09 -04:00
|
|
|
|
2015-03-05 04:57:52 -05:00
|
|
|
#ifdef USE_OPENSSL
|
2005-04-07 11:27:13 -04:00
|
|
|
/*
|
2013-12-25 05:30:51 -05:00
|
|
|
* This header should only be needed to get included by vtls.c and openssl.c
|
2005-04-07 11:27:13 -04:00
|
|
|
*/
|
|
|
|
|
2013-01-03 20:50:28 -05:00
|
|
|
#include "urldata.h"
|
2011-08-28 05:29:09 -04:00
|
|
|
|
2005-04-07 11:27:13 -04:00
|
|
|
CURLcode Curl_ossl_connect(struct connectdata *conn, int sockindex);
|
2007-01-05 18:11:14 -05:00
|
|
|
CURLcode Curl_ossl_connect_nonblocking(struct connectdata *conn,
|
|
|
|
int sockindex,
|
2006-03-21 16:54:44 -05:00
|
|
|
bool *done);
|
2007-07-29 08:54:05 -04:00
|
|
|
|
|
|
|
/* close a SSL connection */
|
|
|
|
void Curl_ossl_close(struct connectdata *conn, int sockindex);
|
|
|
|
|
2005-04-07 11:27:13 -04:00
|
|
|
/* tell OpenSSL to close down all open information regarding connections (and
|
|
|
|
thus session ID caching etc) */
|
2014-12-28 12:21:02 -05:00
|
|
|
void Curl_ossl_close_all(struct SessionHandle *data);
|
2007-07-29 08:54:05 -04:00
|
|
|
|
2005-04-07 11:27:13 -04:00
|
|
|
/* Sets an OpenSSL engine */
|
|
|
|
CURLcode Curl_ossl_set_engine(struct SessionHandle *data, const char *engine);
|
2001-09-07 05:40:46 -04:00
|
|
|
|
2005-04-07 11:27:13 -04:00
|
|
|
/* function provided for the generic SSL-layer, called when a session id
|
|
|
|
should be freed */
|
|
|
|
void Curl_ossl_session_free(void *ptr);
|
2001-08-28 04:37:54 -04:00
|
|
|
|
2005-04-07 11:27:13 -04:00
|
|
|
/* Sets engine as default for all SSL operations */
|
|
|
|
CURLcode Curl_ossl_set_engine_default(struct SessionHandle *data);
|
2001-08-28 04:37:54 -04:00
|
|
|
|
2005-04-07 11:27:13 -04:00
|
|
|
/* Build list of OpenSSL engines */
|
|
|
|
struct curl_slist *Curl_ossl_engines_list(struct SessionHandle *data);
|
2004-12-13 11:43:00 -05:00
|
|
|
|
2005-04-07 11:27:13 -04:00
|
|
|
int Curl_ossl_init(void);
|
|
|
|
void Curl_ossl_cleanup(void);
|
2004-12-13 11:43:00 -05:00
|
|
|
|
2005-04-07 11:27:13 -04:00
|
|
|
size_t Curl_ossl_version(char *buffer, size_t size);
|
2006-05-10 18:17:42 -04:00
|
|
|
int Curl_ossl_check_cxn(struct connectdata *cxn);
|
2007-01-05 18:11:14 -05:00
|
|
|
int Curl_ossl_shutdown(struct connectdata *conn, int sockindex);
|
2008-06-11 13:01:58 -04:00
|
|
|
bool Curl_ossl_data_pending(const struct connectdata *conn,
|
|
|
|
int connindex);
|
2014-06-03 14:04:46 -04:00
|
|
|
|
|
|
|
/* return 0 if a find random is filled in */
|
|
|
|
int Curl_ossl_random(struct SessionHandle *data, unsigned char *entropy,
|
|
|
|
size_t length);
|
2012-06-26 08:52:46 -04:00
|
|
|
void Curl_ossl_md5sum(unsigned char *tmp, /* input */
|
|
|
|
size_t tmplen,
|
|
|
|
unsigned char *md5sum /* output */,
|
|
|
|
size_t unused);
|
2007-01-05 18:11:14 -05:00
|
|
|
|
2014-06-16 09:05:17 -04:00
|
|
|
bool Curl_ossl_cert_status_request(void);
|
|
|
|
|
2015-01-17 11:03:49 -05:00
|
|
|
/* Set the API backend definition to OpenSSL */
|
|
|
|
#define CURL_SSL_BACKEND CURLSSLBACKEND_OPENSSL
|
|
|
|
|
2014-09-13 08:56:27 -04:00
|
|
|
/* this backend supports the CAPATH option */
|
2014-09-13 09:31:12 -04:00
|
|
|
#define have_curlssl_ca_path 1
|
2014-09-13 08:56:27 -04:00
|
|
|
|
2014-09-13 09:11:26 -04:00
|
|
|
/* this backend supports CURLOPT_CERTINFO */
|
|
|
|
#define have_curlssl_certinfo 1
|
|
|
|
|
2014-09-13 09:28:08 -04:00
|
|
|
/* this backend suppots CURLOPT_SSL_CTX_* */
|
|
|
|
#define have_curlssl_ssl_ctx 1
|
|
|
|
|
2008-06-11 13:01:58 -04:00
|
|
|
/* API setup for OpenSSL */
|
|
|
|
#define curlssl_init Curl_ossl_init
|
|
|
|
#define curlssl_cleanup Curl_ossl_cleanup
|
|
|
|
#define curlssl_connect Curl_ossl_connect
|
|
|
|
#define curlssl_connect_nonblocking Curl_ossl_connect_nonblocking
|
|
|
|
#define curlssl_session_free(x) Curl_ossl_session_free(x)
|
|
|
|
#define curlssl_close_all Curl_ossl_close_all
|
|
|
|
#define curlssl_close Curl_ossl_close
|
|
|
|
#define curlssl_shutdown(x,y) Curl_ossl_shutdown(x,y)
|
|
|
|
#define curlssl_set_engine(x,y) Curl_ossl_set_engine(x,y)
|
|
|
|
#define curlssl_set_engine_default(x) Curl_ossl_set_engine_default(x)
|
|
|
|
#define curlssl_engines_list(x) Curl_ossl_engines_list(x)
|
|
|
|
#define curlssl_version Curl_ossl_version
|
|
|
|
#define curlssl_check_cxn Curl_ossl_check_cxn
|
|
|
|
#define curlssl_data_pending(x,y) Curl_ossl_data_pending(x,y)
|
2012-06-26 08:52:46 -04:00
|
|
|
#define curlssl_random(x,y,z) Curl_ossl_random(x,y,z)
|
|
|
|
#define curlssl_md5sum(a,b,c,d) Curl_ossl_md5sum(a,b,c,d)
|
2014-06-16 09:05:17 -04:00
|
|
|
#define curlssl_cert_status_request() Curl_ossl_cert_status_request()
|
2008-06-11 13:01:58 -04:00
|
|
|
|
2015-03-12 18:16:28 -04:00
|
|
|
#define DEFAULT_CIPHER_SELECTION \
|
2015-03-12 18:29:46 -04:00
|
|
|
"ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH"
|
2014-01-10 18:05:19 -05:00
|
|
|
|
2015-03-05 04:57:52 -05:00
|
|
|
#endif /* USE_OPENSSL */
|
2011-08-28 05:29:09 -04:00
|
|
|
#endif /* HEADER_CURL_SSLUSE_H */
|