Resync
[CMakeLuaTailorHgBridge.git] / CMakeLua / Utilities / cmcurl-7.19.0 / lib / ssluse.h
blob417b0a7427dea82d9b6ec0c19cba93b48e4a6750
1 #ifndef __SSLUSE_H
2 #define __SSLUSE_H
3 /***************************************************************************
4 * _ _ ____ _
5 * Project ___| | | | _ \| |
6 * / __| | | | |_) | |
7 * | (__| |_| | _ <| |___
8 * \___|\___/|_| \_\_____|
10 * Copyright (C) 1998 - 2008, 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: ssluse.h,v 1.1.1.1 2008-09-23 16:32:05 hoffman Exp $
24 ***************************************************************************/
26 #ifdef USE_SSLEAY
28 * This header should only be needed to get included by sslgen.c and ssluse.c
31 #include "urldata.h"
32 CURLcode Curl_ossl_connect(struct connectdata *conn, int sockindex);
33 CURLcode Curl_ossl_connect_nonblocking(struct connectdata *conn,
34 int sockindex,
35 bool *done);
37 /* close a SSL connection */
38 void Curl_ossl_close(struct connectdata *conn, int sockindex);
40 /* tell OpenSSL to close down all open information regarding connections (and
41 thus session ID caching etc) */
42 int Curl_ossl_close_all(struct SessionHandle *data);
44 /* Sets an OpenSSL engine */
45 CURLcode Curl_ossl_set_engine(struct SessionHandle *data, const char *engine);
47 /* function provided for the generic SSL-layer, called when a session id
48 should be freed */
49 void Curl_ossl_session_free(void *ptr);
51 /* Sets engine as default for all SSL operations */
52 CURLcode Curl_ossl_set_engine_default(struct SessionHandle *data);
54 /* Build list of OpenSSL engines */
55 struct curl_slist *Curl_ossl_engines_list(struct SessionHandle *data);
57 int Curl_ossl_init(void);
58 void Curl_ossl_cleanup(void);
60 ssize_t Curl_ossl_send(struct connectdata *conn,
61 int sockindex,
62 const void *mem,
63 size_t len);
64 ssize_t Curl_ossl_recv(struct connectdata *conn, /* connection data */
65 int num, /* socketindex */
66 char *buf, /* store read data here */
67 size_t buffersize, /* max amount to read */
68 bool *wouldblock);
70 size_t Curl_ossl_version(char *buffer, size_t size);
71 int Curl_ossl_check_cxn(struct connectdata *cxn);
72 int Curl_ossl_seed(struct SessionHandle *data);
74 int Curl_ossl_shutdown(struct connectdata *conn, int sockindex);
75 bool Curl_ossl_data_pending(const struct connectdata *conn,
76 int connindex);
78 /* API setup for OpenSSL */
79 #define curlssl_init Curl_ossl_init
80 #define curlssl_cleanup Curl_ossl_cleanup
81 #define curlssl_connect Curl_ossl_connect
82 #define curlssl_connect_nonblocking Curl_ossl_connect_nonblocking
83 #define curlssl_session_free(x) Curl_ossl_session_free(x)
84 #define curlssl_close_all Curl_ossl_close_all
85 #define curlssl_close Curl_ossl_close
86 #define curlssl_shutdown(x,y) Curl_ossl_shutdown(x,y)
87 #define curlssl_set_engine(x,y) Curl_ossl_set_engine(x,y)
88 #define curlssl_set_engine_default(x) Curl_ossl_set_engine_default(x)
89 #define curlssl_engines_list(x) Curl_ossl_engines_list(x)
90 #define curlssl_send Curl_ossl_send
91 #define curlssl_recv Curl_ossl_recv
92 #define curlssl_version Curl_ossl_version
93 #define curlssl_check_cxn Curl_ossl_check_cxn
94 #define curlssl_data_pending(x,y) Curl_ossl_data_pending(x,y)
96 #endif /* USE_SSLEAY */
97 #endif