aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2017-06-01 15:03:30 +0200
committerDaniel Stenberg <daniel@haxx.se>2017-06-01 21:06:09 +0200
commitefc7c1d86f1543870712d1a0ef4eecd67e933921 (patch)
tree17ce234c855375f1378ee598b9bcf003c51d5531 /include
parent4eafc6c249cd390938cc3216e07571e0fc885bb3 (diff)
typecheck-gcc.h: check CURLINFO_CERTINFO
... and update the certinfo.c example accordingly. Fixes https://github.com/curl/curl/issues/846
Diffstat (limited to 'include')
-rw-r--r--include/curl/typecheck-gcc.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/curl/typecheck-gcc.h b/include/curl/typecheck-gcc.h
index 1d1066d78..0a08175f7 100644
--- a/include/curl/typecheck-gcc.h
+++ b/include/curl/typecheck-gcc.h
@@ -127,6 +127,9 @@ __extension__ ({ \
if(_curl_is_tlssessioninfo_info(_curl_info)) \
if(!_curl_is_arr((arg), struct curl_tlssessioninfo *)) \
_curl_easy_getinfo_err_curl_tlssesssioninfo(); \
+ if(_curl_is_certinfo_info(_curl_info)) \
+ if(!_curl_is_arr((arg), struct curl_certinfo *)) \
+ _curl_easy_getinfo_err_curl_certinfo(); \
if(_curl_is_socket_info(_curl_info)) \
if(!_curl_is_arr((arg), curl_socket_t)) \
_curl_easy_getinfo_err_curl_socket(); \
@@ -210,6 +213,9 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist,
_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_certinfo,
+ "curl_easy_getinfo expects a pointer to "
+ "'struct curl_certinfo *' for this info")
_CURL_WARNING(_curl_easy_getinfo_err_curl_socket,
"curl_easy_getinfo expects a pointer to curl_socket_t for this info")
@@ -380,6 +386,9 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_socket,
#define _curl_is_tlssessioninfo_info(info) \
(((info) == CURLINFO_TLS_SSL_PTR) || ((info) == CURLINFO_TLS_SESSION))
+/* true if info expects a pointer to struct curl_certinfo * argument */
+#define _curl_is_certinfo_info(info) ((info) == CURLINFO_CERTINFO)
+
/* true if info expects a pointer to struct curl_socket_t argument */
#define _curl_is_socket_info(info) \
(CURLINFO_SOCKET < (info))