Skip to content

Commit 6d890d1

Browse files
authored
Fixed a bug when updating key operations on managed HSM (Azure#16789)
* Fixed a bug when update key operations on managed HSM * Update ChangeLog.md
1 parent e45631b commit 6d890d1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/KeyVault/KeyVault/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21+
* Fixed a bug when updating key operations on managed HSM [#16774]
2122
* Fixed the issue when importing no-password certificate [#16742]
2223

2324
## Version 4.2.0

src/KeyVault/KeyVault/Track2Models/Track2HsmClient.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,8 +309,7 @@ private PSKeyVaultKey UpdateKey(KeyClient client, string keyName, string keyVers
309309

310310
try
311311
{
312-
keyBundle = client.UpdateKeyPropertiesAsync(keyProperties, keyAttributes.KeyOps?.Cast<KeyOperation>().ToList())
313-
.GetAwaiter().GetResult();
312+
keyBundle = client.UpdateKeyProperties(keyProperties, keyAttributes.KeyOps?.Select(op => new KeyOperation(op)));
314313
}
315314
catch (Exception ex)
316315
{

0 commit comments

Comments
 (0)