3 /***************************************************************************
5 * Project ___| | | | _ \| |
7 * | (__| |_| | _ <| |___
8 * \___|\___/|_| \_\_____|
10 * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
12 * This software is licensed as described in the file COPYING, which
13 * you should have received as part of this distribution. The terms
14 * are also available at http://curl.haxx.se/docs/copyright.html.
16 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17 * copies of the Software, and permit persons to whom the Software is
18 * furnished to do so, under the terms of the COPYING file.
20 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 * KIND, either express or implied.
23 * $Id: sslgen.h,v 1.2 2007/03/15 19:22:13 andy Exp $
24 ***************************************************************************/
26 bool Curl_ssl_config_matches(struct ssl_config_data
* data
,
27 struct ssl_config_data
* needle
);
28 bool Curl_clone_ssl_config(struct ssl_config_data
* source
,
29 struct ssl_config_data
* dest
);
30 void Curl_free_ssl_config(struct ssl_config_data
* sslc
);
32 int Curl_ssl_init(void);
33 void Curl_ssl_cleanup(void);
34 CURLcode
Curl_ssl_connect(struct connectdata
*conn
, int sockindex
);
35 CURLcode
Curl_ssl_connect_nonblocking(struct connectdata
*conn
,
38 void Curl_ssl_close(struct connectdata
*conn
);
39 /* tell the SSL stuff to close down all open information regarding
40 connections (and thus session ID caching etc) */
41 void Curl_ssl_close_all(struct SessionHandle
*data
);
42 CURLcode
Curl_ssl_set_engine(struct SessionHandle
*data
, const char *engine
);
43 /* Sets engine as default for all SSL operations */
44 CURLcode
Curl_ssl_set_engine_default(struct SessionHandle
*data
);
45 ssize_t
Curl_ssl_send(struct connectdata
*conn
,
49 ssize_t
Curl_ssl_recv(struct connectdata
*conn
, /* connection data */
50 int sockindex
, /* socketindex */
51 char *mem
, /* store read data here */
52 size_t len
); /* max amount to read */
54 /* init the SSL session ID cache */
55 CURLcode
Curl_ssl_initsessions(struct SessionHandle
*, long);
56 /* extract a session ID */
57 int Curl_ssl_getsessionid(struct connectdata
*conn
,
59 size_t *idsize
) /* set 0 if unknown */;
60 /* add a new session ID */
61 CURLcode
Curl_ssl_addsessionid(struct connectdata
*conn
,
66 struct curl_slist
*Curl_ssl_engines_list(struct SessionHandle
*data
);
68 size_t Curl_ssl_version(char *buffer
, size_t size
);
70 int Curl_ssl_check_cxn(struct connectdata
*conn
);
72 CURLcode
Curl_ssl_shutdown(struct connectdata
*conn
, int sockindex
);
74 bool Curl_ssl_data_pending(struct connectdata
*conn
,
77 #if !defined(USE_SSL) && !defined(SSLGEN_C)
78 /* set up blank macros for none-SSL builds */
79 #define Curl_ssl_close_all(x)
82 #define SSL_SHUTDOWN_TIMEOUT 10000 /* ms */