# Values from expansion will not be escaped, this should be
# done using the appropriate xlat method e.g. %{urlencode:<attr>}.
# force_to - Force the response to be decoded with this decoder.
- # May be 'plain' (created reply:REST-HTTP-Body), 'post'
+ # May be 'plain' (creates reply:REST-HTTP-Body), 'post'
# or 'json'.
# tls - TLS settings for HTTPS.
# auth - HTTP auth method to use, one of 'none', 'srp', 'basic',
* done on the first request, but we do it here to minimise
* latency.
*/
+ SET_OPTION(CURLOPT_SSL_VERIFYPEER, 0);
+ SET_OPTION(CURLOPT_SSL_VERIFYHOST, 0);
SET_OPTION(CURLOPT_CONNECT_ONLY, 1);
SET_OPTION(CURLOPT_URL, inst->connect_uri);
SET_OPTION(CURLOPT_RANDOM_FILE, section->tls_random_file);
}
- if (section->tls_check_cert) {
- SET_OPTION(CURLOPT_SSL_VERIFYHOST, (section->tls_check_cert_cn == true) ? 2 : 0);
- } else {
- SET_OPTION(CURLOPT_SSL_VERIFYPEER, 0);
- }
+ SET_OPTION(CURLOPT_SSL_VERIFYPEER, (section->tls_check_cert == true) ? 1 : 0);
+ SET_OPTION(CURLOPT_SSL_VERIFYHOST, (section->tls_check_cert_cn == true) ? 2 : 0);
/*
* Tell CURL how to get HTTP body content, and how to process incoming data.