Skip to content

Commit

Permalink
Fixed warning for an unused function in curl.cpp when building the SD…
Browse files Browse the repository at this point in the history
…K using a version of libcurl older than 7.77.0 (#6073)
  • Loading branch information
ahsonkhan authored Oct 7, 2024
1 parent 9f2b00b commit 8f8d242
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sdk/core/azure-core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

### Bugs Fixed

- Fixed warning for an unused function in curl.cpp when building the SDK using a version of libcurl older than 7.77.0.

### Other Changes

## 1.14.0 (2024-10-03)
Expand Down
4 changes: 4 additions & 0 deletions sdk/core/azure-core/src/http/curl/curl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,9 @@ static void CleanupThread()
}
}

// This function is only used when ExpectedTlsRootCertificate transport options is set to non empty.
// And that capability only impacts the curl transport behavior in versions of libcurl >= 7.77.0.
#if LIBCURL_VERSION_NUM >= 0x074D00 // 7.77.0
std::string PemEncodeFromBase64(std::string const& base64, std::string const& pemType)
{
std::stringstream rv;
Expand All @@ -293,6 +296,7 @@ std::string PemEncodeFromBase64(std::string const& base64, std::string const& pe
rv << encodedValue << std::endl << "-----END " << pemType << "-----" << std::endl;
return rv.str();
}
#endif

Azure::Core::Http::CurlTransportOptions CurlTransportOptionsFromTransportOptions(
Azure::Core::Http::Policies::TransportOptions const& transportOptions)
Expand Down

0 comments on commit 8f8d242

Please sign in to comment.