-
Notifications
You must be signed in to change notification settings - Fork 492
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
Fixing CA2000 #1699
Merged
Merged
Fixing CA2000 #1699
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
0af453e
AmqpClientConnection
azabbasi 0171e4c
Merge branch 'master' into azabbasi/2000
azabbasi f5d653a
MqttTrnasportHandler
azabbasi 75eff98
Update ProvisioningTransportHandlerHttp.cs
azabbasi 18d78c3
Update MqttTransportHandler.cs
azabbasi 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 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 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 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 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 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 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 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 |
---|---|---|
|
@@ -78,11 +78,11 @@ public async override Task<DeviceRegistrationResult> RegisterAsync( | |
|
||
Logging.Associate(authStrategy, this); | ||
|
||
var httpClientHandler = new HttpClientHandler | ||
using var httpClientHandler = new HttpClientHandler() | ||
{ | ||
// Cannot specify a specific protocol here, as desired due to an error: | ||
azabbasi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
// ProvisioningDeviceClient_ValidRegistrationId_AmqpWithProxy_SymmetricKey_RegisterOk_GroupEnrollment failing for me with System.PlatformNotSupportedException: Operation is not supported on this platform. | ||
// When revisiting TLS12 work for DPS, we should figure out why. Perhaps the service needs to support it. | ||
// ProvisioningDeviceClient_ValidRegistrationId_AmqpWithProxy_SymmetricKey_RegisterOk_GroupEnrollment failing for me with System.PlatformNotSupportedException: Operation is not supported on this platform. | ||
// When revisiting TLS12 work for DPS, we should figure out why. Perhaps the service needs to support it. | ||
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. RE on this: https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclienthandler.sslprotocols?view=net-5.0 Short answer is it's only supported on >= .NET4.7.1 |
||
|
||
//SslProtocols = TlsVersions.Preferred, | ||
}; | ||
|
@@ -101,7 +101,7 @@ public async override Task<DeviceRegistrationResult> RegisterAsync( | |
Port = Port, | ||
}; | ||
|
||
DeviceProvisioningServiceRuntimeClient client = authStrategy.CreateClient(builder.Uri, httpClientHandler); | ||
using DeviceProvisioningServiceRuntimeClient client = authStrategy.CreateClient(builder.Uri, httpClientHandler); | ||
client.HttpClient.DefaultRequestHeaders.Add("User-Agent", message.ProductInfo); | ||
Logging.Info(this, $"Uri: {builder.Uri}; User-Agent: {message.ProductInfo}"); | ||
|
||
|
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think we intend to do here? The
store
looks to be a localX509Store
variable, that we don't reference anywhere. Do we simply want to validate that the certificates can be added to any store? Do we think it's relevant if we add them to a new store or to the same store?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this just installs certificates in the cert store , it's the current user's root store btw
https://docs.microsoft.com/en-us/dotnet/api/system.security.cryptography.x509certificates.x509store?view=netframework-4.7.2