aboutsummaryrefslogtreecommitdiff
path: root/lib/ssluse.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2008-06-11 17:01:58 +0000
committerDaniel Stenberg <daniel@haxx.se>2008-06-11 17:01:58 +0000
commit04d5c8fb779afdb4f7e85a701f8b4b987a4016ee (patch)
tree622d3243f17ed29f4df5b3405de5a78599b86e32 /lib/ssluse.h
parent5980b3cbb09c4c06340433041b825cc9bed00eca (diff)
- I did a cleanup of the internal generic SSL layer and how the various SSL
libraries are supported. Starting now, each underlying SSL library support code does a set of defines for the 16 functions the generic layer (sslgen.c) uses (all these new function defines use the prefix "curlssl_"). This greatly simplified the generic layer in readability by involving much less #ifdefs and other preprocessor stuff and should make it easier for people to make libcurl work with new SSL libraries. Hopefully I can later on document these 16 functions somewhat as well. I also made most of the internal SSL-dependent functions (using Curl_ssl_ prefix) #defined to nothing when no SSL support is requested - previously they would unnecessarily call mostly empty functions.
Diffstat (limited to 'lib/ssluse.h')
-rw-r--r--lib/ssluse.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/lib/ssluse.h b/lib/ssluse.h
index 9707c0581..851548902 100644
--- a/lib/ssluse.h
+++ b/lib/ssluse.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -23,6 +23,7 @@
* $Id$
***************************************************************************/
+#ifdef USE_SSLEAY
/*
* This header should only be needed to get included by sslgen.c and ssluse.c
*/
@@ -71,5 +72,26 @@ int Curl_ossl_check_cxn(struct connectdata *cxn);
int Curl_ossl_seed(struct SessionHandle *data);
int Curl_ossl_shutdown(struct connectdata *conn, int sockindex);
+bool Curl_ossl_data_pending(const struct connectdata *conn,
+ int connindex);
+/* 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_send Curl_ossl_send
+#define curlssl_recv Curl_ossl_recv
+#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)
+
+#endif /* USE_SSLEAY */
#endif