diff options
author | Daniel Stenberg <daniel@haxx.se> | 2016-05-01 17:05:38 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2016-05-01 17:05:38 +0200 |
commit | 283babfaf8d8f3bab9d3c63cea94eb0b84e79c37 (patch) | |
tree | 78f3a526d4afe2c60c1e6f26dfabc5d61cd42f79 /lib/url.c | |
parent | 100c7b478fd17fd0c3ffacda7d6aa4b536bc7c6e (diff) |
tls: make setting pinnedkey option fail if not supported
to make it obvious to users trying to use the feature with TLS backends
not supporting it.
Discussed in #781
Reported-by: Travis Burtrum
Diffstat (limited to 'lib/url.c')
-rw-r--r-- | lib/url.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -2072,12 +2072,16 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, #endif break; case CURLOPT_PINNEDPUBLICKEY: +#ifdef have_curlssl_pinnedpubkey /* only by supported backends */ /* * Set pinned public key for SSL connection. * Specify file name of the public key in DER format. */ result = setstropt(&data->set.str[STRING_SSL_PINNEDPUBLICKEY], va_arg(param, char *)); +#else + result = CURLE_NOT_BUILT_IN; +#endif break; case CURLOPT_CAINFO: /* |