-
Notifications
You must be signed in to change notification settings - Fork 165
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
Merged
Merged
Changes from 8 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
503215a
Changed one line
LarryOsterman 639af2d
Set WinHTTP_OPTION_CLIENT_CERT_CONTEXT to enable connections to attes…
LarryOsterman b548635
Map service specific CLIENT_ID, CLIENT_SECRET, and TENANT_ID to AZURE…
LarryOsterman f82904f
clang-format
LarryOsterman fc1a481
clang-format again
LarryOsterman 9c3966a
Only set TLS options if we request TLS
LarryOsterman 48e5ce5
Fixed uninitialized variable problem in storage
LarryOsterman 4982f12
Compilation issues
LarryOsterman eb80057
Pull request feedback
LarryOsterman cc7f426
Renamed serviceName parameter to match the parameter to new-testresou…
LarryOsterman 304f92e
Don't set environment variables if they're already set
LarryOsterman d51d09c
clang-format
LarryOsterman 9fe931e
Set serviceDirectory from environment variables
LarryOsterman 565f60c
@#$@# clang-format
LarryOsterman fb5a4b3
backed out inadvertant change to cmakelists.txt in azure-core\test
LarryOsterman 07c1f22
Further updates to reduce code churn
LarryOsterman 303dd5e
Added AZURE_SERVICE_DIRECTORY to CI test invocation
LarryOsterman 119e2b3
Fixed missing $
LarryOsterman 62916f0
Dump environment variables during tests
LarryOsterman 31dbac0
Upper case serviceDirectory; clarified exception message to make it m…
LarryOsterman 4689bb2
Moved AZURE_SERVICE_DIRECTORY definition from ctest step to variables
LarryOsterman 8c79c6e
Fixed thumbprint generation to use correct buffer - fixes rare crash …
LarryOsterman 03eedca
Explain purpose of AZURE_SERVICE_DIRECTORY environment variable in ar…
LarryOsterman 731fb3c
Small readme update
LarryOsterman 514f25d
Move AZURE_SERVICE_DIRECTORY check to getenv
LarryOsterman 2eb1782
clang_format
LarryOsterman 7f8c322
Comment cleanup
LarryOsterman b889020
Declare requestSecureHttp as const
LarryOsterman 7349047
Pull request feedback
LarryOsterman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 requestSecureHttp( | ||||||
|
LarryOsterman marked this conversation as resolved.
Outdated
|
||||||
| !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. | ||||||
|
|
||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.