~ubuntu-branches/ubuntu/vivid/curl/vivid

« back to all changes in this revision

Viewing changes to lib/sslgen.h

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Schuldei
  • Date: 2009-04-02 23:35:45 UTC
  • mto: (1.2.1 upstream) (3.2.3 sid)
  • mto: This revision was merged to the branch mainline in revision 38.
  • Revision ID: james.westby@ubuntu.com-20090402233545-geixkwhe3izccjt7
Tags: upstream-7.19.4
ImportĀ upstreamĀ versionĀ 7.19.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
 *                            | (__| |_| |  _ <| |___
8
8
 *                             \___|\___/|_| \_\_____|
9
9
 *
10
 
 * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
 
10
 * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
11
11
 *
12
12
 * This software is licensed as described in the file COPYING, which
13
13
 * you should have received as part of this distribution. The terms
20
20
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21
21
 * KIND, either express or implied.
22
22
 *
23
 
 * $Id: sslgen.h,v 1.12 2008-05-09 11:27:55 mmarek Exp $
 
23
 * $Id: sslgen.h,v 1.17 2008-11-11 22:19:27 bagder Exp $
24
24
 ***************************************************************************/
25
25
 
26
26
bool Curl_ssl_config_matches(struct ssl_config_data* data,
29
29
                           struct ssl_config_data* dest);
30
30
void Curl_free_ssl_config(struct ssl_config_data* sslc);
31
31
 
 
32
#ifdef USE_SSL
32
33
int Curl_ssl_init(void);
33
34
void Curl_ssl_cleanup(void);
34
35
CURLcode Curl_ssl_connect(struct connectdata *conn, int sockindex);
35
36
CURLcode Curl_ssl_connect_nonblocking(struct connectdata *conn,
36
37
                                      int sockindex,
37
38
                                      bool *done);
38
 
void Curl_ssl_close(struct connectdata *conn, int sockindex);
39
39
/* tell the SSL stuff to close down all open information regarding
40
40
   connections (and thus session ID caching etc) */
41
41
void Curl_ssl_close_all(struct SessionHandle *data);
 
42
void Curl_ssl_close(struct connectdata *conn, int sockindex);
 
43
CURLcode Curl_ssl_shutdown(struct connectdata *conn, int sockindex);
42
44
CURLcode Curl_ssl_set_engine(struct SessionHandle *data, const char *engine);
43
45
/* Sets engine as default for all SSL operations */
44
46
CURLcode Curl_ssl_set_engine_default(struct SessionHandle *data);
 
47
struct curl_slist *Curl_ssl_engines_list(struct SessionHandle *data);
45
48
ssize_t Curl_ssl_send(struct connectdata *conn,
46
49
                      int sockindex,
47
50
                      const void *mem,
50
53
                      int sockindex,            /* socketindex */
51
54
                      char *mem,                /* store read data here */
52
55
                      size_t len);              /* max amount to read */
53
 
 
54
56
/* init the SSL session ID cache */
55
57
CURLcode Curl_ssl_initsessions(struct SessionHandle *, long);
 
58
size_t Curl_ssl_version(char *buffer, size_t size);
 
59
bool Curl_ssl_data_pending(const struct connectdata *conn,
 
60
                           int connindex);
 
61
int Curl_ssl_check_cxn(struct connectdata *conn);
 
62
void Curl_ssl_free_certinfo(struct SessionHandle *data);
 
63
 
 
64
/* Functions to be used by SSL library adaptation functions */
 
65
 
56
66
/* extract a session ID */
57
67
int Curl_ssl_getsessionid(struct connectdata *conn,
58
68
                          void **ssl_sessionid,
62
72
                               void *ssl_sessionid,
63
73
                               size_t idsize);
64
74
 
65
 
 
66
 
struct curl_slist *Curl_ssl_engines_list(struct SessionHandle *data);
67
 
 
68
 
size_t Curl_ssl_version(char *buffer, size_t size);
69
 
 
70
 
int Curl_ssl_check_cxn(struct connectdata *conn);
71
 
 
72
 
CURLcode Curl_ssl_shutdown(struct connectdata *conn, int sockindex);
73
 
 
74
 
bool Curl_ssl_data_pending(const struct connectdata *conn,
75
 
                           int connindex);
76
 
 
77
 
#if !defined(USE_SSL) && !defined(SSLGEN_C)
78
 
/* set up blank macros for none-SSL builds */
 
75
#define SSL_SHUTDOWN_TIMEOUT 10000 /* ms */
 
76
 
 
77
#else
 
78
/* When SSL support is not present, just define away these function calls */
 
79
#define Curl_ssl_init() 1
 
80
#define Curl_ssl_cleanup() do { } while (0)
 
81
#define Curl_ssl_connect(x,y) CURLE_FAILED_INIT
79
82
#define Curl_ssl_close_all(x)
80
 
#endif
81
 
 
82
 
#define SSL_SHUTDOWN_TIMEOUT 10000 /* ms */
83
 
 
84
 
#endif
 
83
#define Curl_ssl_close(x,y)
 
84
#define Curl_ssl_shutdown(x,y) CURLE_FAILED_INIT
 
85
#define Curl_ssl_set_engine(x,y) CURLE_FAILED_INIT
 
86
#define Curl_ssl_set_engine_default(x) CURLE_FAILED_INIT
 
87
#define Curl_ssl_engines_list(x) NULL
 
88
#define Curl_ssl_send(a,b,c,d) -1
 
89
#define Curl_ssl_recv(a,b,c,d) -1
 
90
#define Curl_ssl_initsessions(x,y) CURLE_OK
 
91
#define Curl_ssl_version(x,y) 0
 
92
#define Curl_ssl_data_pending(x,y) 0
 
93
#define Curl_ssl_check_cxn(x) 0
 
94
#define Curl_ssl_free_certinfo(x)
 
95
 
 
96
#endif
 
97
 
 
98
#endif /* USE_SSL */