-
Notifications
You must be signed in to change notification settings - Fork 150
Fixed Live Tests for Attestation SDK. #3366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
503215a
639af2d
b548635
f82904f
fc1a481
9c3966a
48e5ce5
4982f12
eb80057
cc7f426
304f92e
d51d09c
9fe931e
565f60c
fb5a4b3
07c1f22
303dd5e
119e2b3
62916f0
31dbac0
4689bb2
8c79c6e
03eedca
731fb3c
514f25d
2eb1782
7f8c322
b889020
7349047
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,8 +33,10 @@ namespace Azure { namespace Core { namespace _internal { | |
| static bool LocaleInvariantCaseInsensitiveEqual( | ||
| const std::string& lhs, | ||
| const std::string& rhs) noexcept; | ||
| static std::string const ToLower(const std::string& src) noexcept; | ||
| static unsigned char ToLower(const unsigned char src) noexcept; | ||
| static std::string const ToLower(std::string const& src) noexcept; | ||
| static unsigned char ToLower(unsigned char const src) noexcept; | ||
| static std::string const ToUpper(std::string const& src) noexcept; | ||
| static unsigned char ToUpper(unsigned char const src) noexcept; | ||
|
Comment on lines
+38
to
+39
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This API addition, as a complement to However, unlike private APIs in the In general, we'd avoid adding APIs to the SDK that are only used by unit tests :) |
||
| }; | ||
|
|
||
| }}} // namespace Azure::Core::_internal | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -303,6 +303,9 @@ void WinHttpTransport::CreateRequestHandle(std::unique_ptr<_detail::HandleManage | |||||
| { | ||||||
| const std::string& path = handleManager->m_request.GetUrl().GetRelativeUrl(); | ||||||
| HttpMethod requestMethod = handleManager->m_request.GetMethod(); | ||||||
| bool const requestSecureHttp( | ||||||
| !Azure::Core::_internal::StringExtensions::LocaleInvariantCaseInsensitiveEqual( | ||||||
| handleManager->m_request.GetUrl().GetScheme(), HttpScheme)); | ||||||
|
|
||||||
| // Create an HTTP request handle. | ||||||
| handleManager->m_requestHandle = WinHttpOpenRequest( | ||||||
|
|
@@ -314,10 +317,7 @@ void WinHttpTransport::CreateRequestHandle(std::unique_ptr<_detail::HandleManage | |||||
| NULL, // Use HTTP/1.1 | ||||||
| WINHTTP_NO_REFERER, | ||||||
| WINHTTP_DEFAULT_ACCEPT_TYPES, // No media types are accepted by the client | ||||||
| Azure::Core::_internal::StringExtensions::LocaleInvariantCaseInsensitiveEqual( | ||||||
| handleManager->m_request.GetUrl().GetScheme(), HttpScheme) | ||||||
| ? 0 | ||||||
| : WINHTTP_FLAG_SECURE); // Uses secure transaction semantics (SSL/TLS) | ||||||
| requestSecureHttp ? WINHTTP_FLAG_SECURE : 0); // Uses secure transaction semantics (SSL/TLS) | ||||||
|
|
||||||
| if (!handleManager->m_requestHandle) | ||||||
| { | ||||||
|
|
@@ -330,6 +330,23 @@ void WinHttpTransport::CreateRequestHandle(std::unique_ptr<_detail::HandleManage | |||||
| // ERROR_NOT_ENOUGH_MEMORY | ||||||
| GetErrorAndThrow("Error while getting a request handle."); | ||||||
| } | ||||||
|
|
||||||
| if (requestSecureHttp) | ||||||
| { | ||||||
| // If the service requests TLS client certificates, we want to let the WinHTTP APIs know that | ||||||
| // it's ok to initiate the request without a client certificate. | ||||||
| // | ||||||
| // Note: If/When TLS client certificate support is added to the pipeline, this line may need to | ||||||
| // be revisited. | ||||||
| if (!WinHttpSetOption( | ||||||
| handleManager->m_requestHandle, | ||||||
| WINHTTP_OPTION_CLIENT_CERT_CONTEXT, | ||||||
| WINHTTP_NO_CLIENT_CERT_CONTEXT, | ||||||
| 0)) | ||||||
| { | ||||||
| GetErrorAndThrow("Error while setting client cert context to ignore.."); | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: Extra period
Suggested change
|
||||||
| } | ||||||
| } | ||||||
| } | ||||||
|
|
||||||
| // For PUT/POST requests, send additional data using WinHttpWriteData. | ||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.