summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2017-06-01 14:55:05 +0200
committerDaniel Stenberg <daniel@haxx.se>2017-06-01 21:06:09 +0200
commit4eafc6c249cd390938cc3216e07571e0fc885bb3 (patch)
tree79a74ffe31ea632a7bdea0c15ea03dc415d387ad /include
parent5fe4f7890221b6ff12967af83ce0f14c05f1e2b0 (diff)
downloadcurl-4eafc6c249cd390938cc3216e07571e0fc885bb3.tar.gz
typecheck-gcc.h: check CURLINFO_TLS_SSL_PTR and CURLINFO_TLS_SESSION
... so that they get the required "struct curl_tlssessioninfo **" arguments.
Diffstat (limited to 'include')
-rw-r--r--include/curl/typecheck-gcc.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/curl/typecheck-gcc.h b/include/curl/typecheck-gcc.h
index ecc9dfb94..1d1066d78 100644
--- a/include/curl/typecheck-gcc.h
+++ b/include/curl/typecheck-gcc.h
@@ -124,6 +124,9 @@ __extension__ ({ \
if(_curl_is_slist_info(_curl_info)) \
if(!_curl_is_arr((arg), struct curl_slist *)) \
_curl_easy_getinfo_err_curl_slist(); \
+ if(_curl_is_tlssessioninfo_info(_curl_info)) \
+ if(!_curl_is_arr((arg), struct curl_tlssessioninfo *)) \
+ _curl_easy_getinfo_err_curl_tlssesssioninfo(); \
if(_curl_is_socket_info(_curl_info)) \
if(!_curl_is_arr((arg), curl_socket_t)) \
_curl_easy_getinfo_err_curl_socket(); \
@@ -204,6 +207,9 @@ _CURL_WARNING(_curl_easy_getinfo_err_double,
"curl_easy_getinfo expects a pointer to double for this info")
_CURL_WARNING(_curl_easy_getinfo_err_curl_slist,
"curl_easy_getinfo expects a pointer to 'struct curl_slist *' for this info")
+_CURL_WARNING(_curl_easy_getinfo_err_curl_tlssesssioninfo,
+ "curl_easy_getinfo expects a pointer to "
+ "'struct curl_tlssessioninfo *' for this info")
_CURL_WARNING(_curl_easy_getinfo_err_curl_socket,
"curl_easy_getinfo expects a pointer to curl_socket_t for this info")
@@ -370,6 +376,10 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_socket,
#define _curl_is_slist_info(info) \
(((info) == CURLINFO_SSL_ENGINES) || ((info) == CURLINFO_COOKIELIST))
+/* true if info expects a pointer to struct curl_tlssessioninfo * argument */
+#define _curl_is_tlssessioninfo_info(info) \
+ (((info) == CURLINFO_TLS_SSL_PTR) || ((info) == CURLINFO_TLS_SESSION))
+
/* true if info expects a pointer to struct curl_socket_t argument */
#define _curl_is_socket_info(info) \
(CURLINFO_SOCKET < (info))