Closed matt-richardson closed 7 years ago
Looks like its hitting the CryptographicException, and then returning cert.RawData
, which doesn't appear to contain the private key...
@singhkay Can you take a look?
@hyonholee Can you take a look at the X509Certificate2
code?
@twitchax: "Azure PowerShell continues to maintain RDFE support on a legacy basis: new functionality and bug fixes are addressed sparingly. This issue does not meet the current threshold for consideration."
This drove me nuts for a few hours. What is the criteria to determine when a bug needs a fix?
@matt-richardson Any news on this? We are hitting the same issue if we don't save the pfx first... (Hi btw!)
Hey @mikeblakeuk! Even though this should've been relatively simple, it was closed as wont fix. Only workaround is to save to file first.
Add-AzureCertificate
has the ability to receive the-certToDeploy
as either a string (filename) or anX509Certificate2
object.When using the overload that takes the
X509Certificate2
object, it doesn't appear to upload the private key part of the certificate:it fails with an error when the certificate is used in a cloud service deployment via
New-AzureDeployment
:(Before you ask, the reason its writing it to a file first is the certificate is stored in OctopusDeploy as Base64 encoded text).
However, if it gets written to a file, and the file based overload is used, it works:
Either I'm doing something crazy, or there's a mismatch between the two bits of functionality. Can you take a look?