aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2012-06-27 17:14:59 +0200
committerYang Tse <yangsita@gmail.com>2012-06-27 17:14:59 +0200
commite3014dcc01af5aac535dce21a9840346829463e8 (patch)
tree93d315baf472187581e8d291848c2a48c3d07d0e
parent57d2732ccb97943f2ac026513f2bc1b2b78548f6 (diff)
sslgen.c: add compile-time check for SSL-backend completeness
-rw-r--r--lib/sslgen.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/sslgen.c b/lib/sslgen.c
index abb628d90..96582d3ae 100644
--- a/lib/sslgen.c
+++ b/lib/sslgen.c
@@ -165,6 +165,39 @@ void Curl_free_ssl_config(struct ssl_config_data* sslc)
#ifdef USE_SSL
+/* SSL 'backend' compile-time sanity checks */
+#if !defined(curlssl_init)
+# error "SSL backend lacks definition for curlssl_init"
+#elif !defined(curlssl_cleanup)
+# error "SSL backend lacks definition for curlssl_cleanup"
+#elif !defined(curlssl_connect) && !defined(curlssl_connect_nonblocking)
+# error "SSL backend lacks curlssl_connect or curlssl_connect_nonblocking"
+#elif !defined(curlssl_session_free)
+# error "SSL backend lacks definition for curlssl_session_free"
+#elif !defined(curlssl_close_all)
+# error "SSL backend lacks definition for curlssl_close_all"
+#elif !defined(curlssl_close)
+# error "SSL backend lacks definition for curlssl_close"
+#elif !defined(curlssl_shutdown)
+# error "SSL backend lacks definition for curlssl_shutdown"
+#elif !defined(curlssl_set_engine)
+# error "SSL backend lacks definition for curlssl_set_engine"
+#elif !defined(curlssl_set_engine_default)
+# error "SSL backend lacks definition for curlssl_set_engine_default"
+#elif !defined(curlssl_engines_list)
+# error "SSL backend lacks definition for curlssl_engines_list"
+#elif !defined(curlssl_version)
+# error "SSL backend lacks definition for curlssl_version"
+#elif !defined(curlssl_check_cxn)
+# error "SSL backend lacks definition for curlssl_check_cxn"
+#elif !defined(curlssl_data_pending)
+# error "SSL backend lacks definition for curlssl_data_pending"
+#elif !defined(curlssl_random)
+# error "SSL backend lacks definition for curlssl_random"
+#elif !defined(curlssl_md5sum)
+# error "SSL backend lacks definition for curlssl_md5sum"
+#endif
+
/* "global" init done? */
static bool init_ssl=FALSE;