Skip to content
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

Correct creation of the CryptographyClient in the KeyVaultService. #755

Merged
merged 1 commit into from
Aug 14, 2024

Conversation

dlemstra
Copy link
Contributor

@dlemstra dlemstra commented Aug 9, 2024

This corrects the implementation of the creation of the CryptographyClient. The KeyClient that was created used the KeyId instead of the url of the keyvault here: KeyClient keyClient = new(certificateWithPolicy.KeyId, _tokenCredential);. And that was then used to create a CryptographyClient with an incorrect url.

I have fixed this by creating the CryptographyClient without using the KeyClient because we already get this information when the public key is retrieved. I have also removed the _task field to make it possible to pass the cancellationToken to the GetCertificateAsync call.

@dtivel dtivel merged commit 429d24d into dotnet:main Aug 14, 2024
3 checks passed
@dtivel
Copy link
Collaborator

dtivel commented Aug 14, 2024

Looks good, @dlemstra. Thanks for the PR.

@dlemstra dlemstra deleted the correct-key-vault-implementation branch August 14, 2024 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants