aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-09-07 09:40:46 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-09-07 09:40:46 +0000
commit46372c04ee06d75e2b7c0c60b1f80ee926a45749 (patch)
tree8a362d80511572f11be26980c1b39d27efab17b2
parent6147879837a53d22c9be04e7a4fc315a297ba2b3 (diff)
made it compile properly when not building with SSL support
-rw-r--r--lib/ssluse.c43
-rw-r--r--lib/ssluse.h1
2 files changed, 26 insertions, 18 deletions
diff --git a/lib/ssluse.c b/lib/ssluse.c
index e14601564..a3cf492b9 100644
--- a/lib/ssluse.c
+++ b/lib/ssluse.c
@@ -263,7 +263,6 @@ static int init_ssl=0;
void Curl_SSL_init(void)
{
#ifdef USE_SSLEAY
-
/* make sure this is only done once */
if(0 != init_ssl)
return;
@@ -275,9 +274,32 @@ void Curl_SSL_init(void)
/* Setup all the global SSL stuff */
SSLeay_add_ssl_algorithms();
+#else
+ /* SSL disabled, do nothing */
#endif
}
+/* Global cleanup */
+void Curl_SSL_cleanup(void)
+{
+#ifdef USE_SSLEAY
+ if(init_ssl) {
+ /* only cleanup if we did a previous init */
+
+ /* Free the SSL error strings */
+ ERR_free_strings();
+
+ /* EVP_cleanup() removes all ciphers and digests from the
+ table. */
+ EVP_cleanup();
+ }
+#else
+ /* SSL disabled, do nothing */
+#endif
+}
+
+#ifdef USE_SSLEAY
+
/*
* This function is called when an SSL connection is closed.
*/
@@ -310,23 +332,6 @@ void Curl_SSL_Close(struct connectdata *conn)
}
}
-/* Global cleanup */
-void Curl_SSL_cleanup(void)
-{
-#ifdef USE_SSLEAY
-
- if(init_ssl) {
- /* only cleanup if we did a previous init */
-
- /* Free the SSL error strings */
- ERR_free_strings();
-
- /* EVP_cleanup() removes all ciphers and digests from the
- table. */
- EVP_cleanup();
- }
-#endif
-}
/*
* This sets up a session cache to the specified size.
@@ -467,6 +472,8 @@ static int Store_SSL_Session(struct connectdata *conn)
return 0;
}
+#endif
+
/* ====================================================== */
CURLcode
Curl_SSLConnect(struct connectdata *conn)
diff --git a/lib/ssluse.h b/lib/ssluse.h
index 8ac4bf61b..e8115f007 100644
--- a/lib/ssluse.h
+++ b/lib/ssluse.h
@@ -24,6 +24,7 @@
*****************************************************************************/
#include "urldata.h"
CURLcode Curl_SSLConnect(struct connectdata *conn);
+
void Curl_SSL_init(void); /* Global SSL init */
void Curl_SSL_cleanup(void); /* Global SSL cleanup */