void Curl_SSL_init(void)
{
#ifdef USE_SSLEAY
-
/* make sure this is only done once */
if(0 != init_ssl)
return;
/* 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.
*/
}
}
-/* 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.
return 0;
}
+#endif
+
/* ====================================================== */
CURLcode
Curl_SSLConnect(struct connectdata *conn)
*****************************************************************************/
#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 */