-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
[IoT]IoT Hub SDK version update to 4.2.0 and fixed Get-AzIoTHub to work with DigiCert hubs #20938
Conversation
|
||
CertificateDescription certificateDescription; | ||
certificateDescription = this.IotHubClient.Certificates.CreateOrUpdate(this.ResourceGroupName, this.Name, this.CertificateName, this.Etag, certificateBodyDescription.Certificate); | ||
certificateDescription = this.IotHubClient.Certificates.CreateOrUpdate(this.ResourceGroupName, this.Name, this.CertificateName, this.Etag, certificateProperties); |
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.
do we want to point to a copy rather than the original object here?
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.
As we discussed offline, since we are adding certificate, there is no original object, instead we would need to create a new object in order to use CreateOrUpdate. Also tested that only pass in the certificate is enough, the rest CertificateProperties properties can be figured out after the service call, this is the return after calling this command:
Id : /subscriptions/a386d5ea-ea90-441a-8263-d816368c84a1/resourceGroups/jiacjutest/providers/Microsoft.D
evices/IotHubs/newstate/certificates/certifitry
ResourceGroupName : jiacjutest
Name : newstate
CertificateName : certifitry
Subject : management
Thumbprint : 46BB6DAA9A62A4D256FC02A1F73AAB18F7724B72
Status : Unverified
Expiry : 9/27/2031 12:09
Created : 1/01/0001 00:01
Etag : IjhlMDI2ODQ1LTAwMDAtMDMwMC0wMDAwLTYzZWQ4YzZjMDAwMCI=
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.
LGTM
/azp run azure-powershell - security-tools |
Azure Pipelines successfully started running 1 pipeline(s). |
…th DigiCert hubs
Description
This PR is mainly to unblock user from not able to use Get-AzIoTHub with DigiCert hubs:
IoT Hub SDK version update to 4.2.0 and fixed some minor type error introduced by the version update
Fixed Get-AzIoTHub to work with DigiCert hubs by adding RootCertificateV2 to PSCapabilities
Checklist
CONTRIBUTING.md
and reviewed the following information:generation
branch.ChangeLog.md
file(s) appropriatelyChangeLog.md
file can be found atsrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
## Upcoming Release
header in the past tense. Add changelog in description section if PR goes intogeneration
branch.ChangeLog.md
if no new release is required, such as fixing test case only.