|
20 | 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY |
21 | 21 | * KIND, either express or implied. |
22 | 22 | * |
| 23 | + * SPDX-License-Identifier: curl |
| 24 | + * |
23 | 25 | ***************************************************************************/ |
24 | 26 |
|
25 | 27 | /* |
@@ -613,6 +615,7 @@ typedef enum { |
613 | 615 | CURLE_QUIC_CONNECT_ERROR, /* 96 - QUIC connection error */ |
614 | 616 | CURLE_PROXY, /* 97 - proxy handshake error */ |
615 | 617 | CURLE_SSL_CLIENTCERT, /* 98 - client-side certificate required */ |
| 618 | + CURLE_UNRECOVERABLE_POLL, /* 99 - poll/select returned fatal error */ |
616 | 619 | CURL_LAST /* never use! */ |
617 | 620 | } CURLcode; |
618 | 621 |
|
@@ -855,7 +858,18 @@ typedef int |
855 | 858 | const struct curl_khkey *knownkey, /* known */ |
856 | 859 | const struct curl_khkey *foundkey, /* found */ |
857 | 860 | enum curl_khmatch, /* libcurl's view on the keys */ |
858 | | - void *clientp); /* custom pointer passed from app */ |
| 861 | + void *clientp); /* custom pointer passed with */ |
| 862 | + /* CURLOPT_SSH_KEYDATA */ |
| 863 | + |
| 864 | +typedef int |
| 865 | + (*curl_sshhostkeycallback) (void *clientp,/* custom pointer passed*/ |
| 866 | + /* with CURLOPT_SSH_HOSTKEYDATA */ |
| 867 | + int keytype, /* CURLKHTYPE */ |
| 868 | + const char *key, /*hostkey to check*/ |
| 869 | + size_t keylen); /*length of the key*/ |
| 870 | + /*return CURLE_OK to accept*/ |
| 871 | + /*or something else to refuse*/ |
| 872 | + |
859 | 873 |
|
860 | 874 | /* parameter for the CURLOPT_USE_SSL option */ |
861 | 875 | typedef enum { |
@@ -2122,6 +2136,13 @@ typedef enum { |
2122 | 2136 | /* Set MIME option flags. */ |
2123 | 2137 | CURLOPT(CURLOPT_MIME_OPTIONS, CURLOPTTYPE_LONG, 315), |
2124 | 2138 |
|
| 2139 | + /* set the SSH host key callback, must point to a curl_sshkeycallback |
| 2140 | + function */ |
| 2141 | + CURLOPT(CURLOPT_SSH_HOSTKEYFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 316), |
| 2142 | + |
| 2143 | + /* set the SSH host key callback custom pointer */ |
| 2144 | + CURLOPT(CURLOPT_SSH_HOSTKEYDATA, CURLOPTTYPE_CBPOINT, 317), |
| 2145 | + |
2125 | 2146 | CURLOPT_LASTENTRY /* the last unused */ |
2126 | 2147 | } CURLoption; |
2127 | 2148 |
|
@@ -2589,8 +2610,10 @@ CURL_EXTERN void curl_free(void *p); |
2589 | 2610 | * |
2590 | 2611 | * curl_global_init() should be invoked exactly once for each application that |
2591 | 2612 | * uses libcurl and before any call of other libcurl functions. |
2592 | | - * |
2593 | | - * This function is not thread-safe! |
| 2613 | +
|
| 2614 | + * This function is thread-safe if CURL_VERSION_THREADSAFE is set in the |
| 2615 | + * curl_version_info_data.features flag (fetch by curl_version_info()). |
| 2616 | +
|
2594 | 2617 | */ |
2595 | 2618 | CURL_EXTERN CURLcode curl_global_init(long flags); |
2596 | 2619 |
|
@@ -2799,8 +2822,9 @@ typedef enum { |
2799 | 2822 | CURLINFO_EFFECTIVE_METHOD = CURLINFO_STRING + 58, |
2800 | 2823 | CURLINFO_PROXY_ERROR = CURLINFO_LONG + 59, |
2801 | 2824 | CURLINFO_REFERER = CURLINFO_STRING + 60, |
2802 | | - |
2803 | | - CURLINFO_LASTONE = 60 |
| 2825 | + CURLINFO_CAINFO = CURLINFO_STRING + 61, |
| 2826 | + CURLINFO_CAPATH = CURLINFO_STRING + 62, |
| 2827 | + CURLINFO_LASTONE = 62 |
2804 | 2828 | } CURLINFO; |
2805 | 2829 |
|
2806 | 2830 | /* CURLINFO_RESPONSE_CODE is the new name for the option previously known as |
@@ -3006,6 +3030,7 @@ typedef struct curl_version_info_data curl_version_info_data; |
3006 | 3030 | #define CURL_VERSION_UNICODE (1<<27) /* Unicode support on Windows */ |
3007 | 3031 | #define CURL_VERSION_HSTS (1<<28) /* HSTS is supported */ |
3008 | 3032 | #define CURL_VERSION_GSASL (1<<29) /* libgsasl is supported */ |
| 3033 | +#define CURL_VERSION_THREADSAFE (1<<30) /* libcurl API is thread-safe */ |
3009 | 3034 |
|
3010 | 3035 | /* |
3011 | 3036 | * NAME curl_version_info() |
|
0 commit comments