Skip to content

Commit

Permalink
Sets the curl proxy ssl verify options to the values of the host conf…
Browse files Browse the repository at this point in the history
…iguration options

This fixes #1616
  • Loading branch information
jcorporation authored and MaxKellermann committed Sep 27, 2022
1 parent 15ff7c4 commit 7ab0dfc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/input/plugins/CurlInputPlugin.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,8 @@ CurlInputStream::InitEasy()
request->SetVerifyPeer(verify_peer);
request->SetVerifyHost(verify_host);
request->SetOption(CURLOPT_HTTPHEADER, request_headers.Get());
request->SetProxyVerifyPeer(verify_peer);
request->SetProxyVerifyHost(verify_host);
}

void
Expand Down
8 changes: 8 additions & 0 deletions src/lib/curl/Request.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,14 @@ public:
easy.SetVerifyPeer(value);
}

void SetProxyVerifyHost(bool value) {
easy.SetOption(CURLOPT_PROXY_SSL_VERIFYHOST, value ? 2L : 0L);
}

void SetProxyVerifyPeer(bool value) {
easy.SetOption(CURLOPT_PROXY_SSL_VERIFYPEER, value);
}

void SetNoBody(bool value=true) {
easy.SetNoBody(value);
}
Expand Down

0 comments on commit 7ab0dfc

Please sign in to comment.