Open Johno-ACSLive opened 3 years ago
Try using Get-PfxCertificate...this worked for me.
Still had the same error, appears the Get-PAOrder requires to be in the following syntax.
$pfxPass = (Get-PAOrder -Name $certificateName).PfxPass
The original doesn't specify which parameter to be assigned. Adding the -Name in front fixes the problem alongside your recommendation (I didn't try the original code - assuming it would also continue to work as well).
I made a few other changes so I'll post a PR with the complete changes.
I've had the script fail in Azure DevOps, version 4.6.0 is the last version that enables successful renewals of certificates. Any version above 4.7.0 does not.
The failure occurs with Import-AcmeCertificateToKeyVault.ps1:35
Line | 35 | … rtificate = New-Object -TypeName System.Security.Cryptography.X509Cer … |
~~~~~~~~~~~~~ | Exception calling ".ctor" with "3" argument(s): "The | certificate data cannot be read with the provided password, | the password may be incorrect."It appears the library went through quite a big change in version 4.7.0 but I haven't had time to check the details of what's changed. I've temporarily updated the script in my repo to only download version 4.6.0 of Posh-ACME until more is known of the breaking changes.