diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2017-04-24 02:38:03 -0400 |
---|---|---|
committer | Sven Nierlein <sven@nierlein.de> | 2018-10-22 16:30:31 +0200 |
commit | 7c74b772ed0b35699e57ecbe8789b0436a6c67ee (patch) | |
tree | f9e644aa8f4d030dda50b497a2fac1f45c24cb5d | |
parent | f91be546bf70787f84a30431b327d1c675de3d9d (diff) | |
download | monitoring-plugins-7c74b772ed0b35699e57ecbe8789b0436a6c67ee.tar.gz |
must use host_name and not server_address in URL, CN subject mismatch
-rw-r--r-- | plugins/check_curl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/check_curl.c b/plugins/check_curl.c index 050c0d4c..87fa1da9 100644 --- a/plugins/check_curl.c +++ b/plugins/check_curl.c | |||
@@ -325,9 +325,9 @@ check_http (void) | |||
325 | 325 | ||
326 | /* compose URL */ | 326 | /* compose URL */ |
327 | snprintf (url, DEFAULT_BUFFER_SIZE, "%s://%s%s", use_ssl ? "https" : "http", | 327 | snprintf (url, DEFAULT_BUFFER_SIZE, "%s://%s%s", use_ssl ? "https" : "http", |
328 | server_address, server_url); | 328 | host_name, server_url); |
329 | handle_curl_option_return_code (curl_easy_setopt (curl, CURLOPT_URL, url), "CURLOPT_URL"); | 329 | handle_curl_option_return_code (curl_easy_setopt (curl, CURLOPT_URL, url), "CURLOPT_URL"); |
330 | 330 | ||
331 | /* set port */ | 331 | /* set port */ |
332 | handle_curl_option_return_code (curl_easy_setopt (curl, CURLOPT_PORT, server_port), "CURLOPT_PORT"); | 332 | handle_curl_option_return_code (curl_easy_setopt (curl, CURLOPT_PORT, server_port), "CURLOPT_PORT"); |
333 | 333 | ||