Skip to content

Commit a081301

Browse files
authored
[KeyVault] Fixed import key from encrypted certificate in Add-AzKeyVaultKey (#20239)
* wip * pfxWebKeyConverter * Fixed certificate export parameter issue in Add-AzKeyVaultKey * polish * polish * polish
1 parent 67ba4a7 commit a081301

File tree

6 files changed

+433
-13
lines changed

6 files changed

+433
-13
lines changed

src/KeyVault/KeyVault.Test/PesterTests/Key.Tests.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ Describe "Update key" {
4545
}
4646

4747
Describe "Import key" {
48+
It "Import a RSA key from pfx certificate"{
49+
Add-AzKeyVaultKey -VaultName bez-kv1123 -KeyName bez-key1123 -KeyFilePath "$PSScriptRoot\..\Resources\importkeytest.pfx" -KeyFilePassword (ConvertTo-SecureString 123456 -AsPlainText -Force)
50+
}
51+
4852
It "should throw when key type EC and curve name are not paired" {
4953
{
5054
Add-AzKeyVaultKey -VaultName veakkine-kv -Name PSECImportedKey -KeyFilePath E:\targetBlob.byok -KeyType EC -ErrorAction Stop
Binary file not shown.

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 certificate export parameter issue in `Add-AzKeyVaultKey` [#19623]
2122
* Fixed CertificateString decoding issue in `Import-AzKeyVaultCertificate`
2223
* Shifted the location of key CVM release policy to GitHub [#19984]
2324
* Added fallback logic (reading default CVM policy from a local copy) if fetching default CVM Policy from GitHub failed.

0 commit comments

Comments
 (0)