Skip to content

Commit b3156ec

Browse files
committed
add libcurl min version
1 parent 41b25b1 commit b3156ec

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

google/cloud/credentials.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ namespace experimental {
3939
*
4040
* @note This option is currently experimental and only works with services
4141
* using JSON/HTTP transport.
42+
*
43+
* @note Requires libcurl v7.71.0 or later.
4244
*/
4345
struct ClientSslCertificateOption {
4446
using Type = SslCertificate;

google/cloud/internal/curl_impl.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,7 @@ Status CurlImpl::MakeRequest(HttpMethod method, RestContext& context,
333333
if (!status.ok()) return OnTransferError(context, std::move(status));
334334
}
335335

336+
#if CURL_AT_LEAST_VERSION(7, 71, 0)
336337
if (client_ssl_cert_.has_value()) {
337338
status = handle_.SetOption(CURLOPT_SSL_VERIFYPEER, 1L);
338339
if (!status.ok()) return OnTransferError(context, std::move(status));
@@ -361,6 +362,7 @@ Status CurlImpl::MakeRequest(HttpMethod method, RestContext& context,
361362
status = handle_.SetOption(CURLOPT_SSLKEY_BLOB, &ssl_key_blob);
362363
if (!status.ok()) return OnTransferError(context, std::move(status));
363364
}
365+
#endif
364366

365367
if (method == HttpMethod::kGet) {
366368
status = handle_.SetOption(CURLOPT_NOPROGRESS, 1L);

0 commit comments

Comments
 (0)