Closed Jiancao164 closed 1 year ago
This PR fixes #509.
Hi @vmwclabot @kamennikolov, can you take a look at this PR?
Thank you for this fix.
@kamennikolov , thank you for doing it! Since we are currently waiting for it, when can we expect the new version to be published in PSGallery?
We have built the module, so you can now take it from the github repo. Uploading it to the PowerShell gallery will take some time though.
@kamennikolov What's the timeframe we should anticipate for the release to PSGallery?
It dependes on when we'll have the resources to do it. Currently everyone in the team is busy with tasks for the next PowerCLI release. I cannot give a specific timeframe.
The new version is now uploaded to the PowerShell Gallery - https://www.powershellgallery.com/packages/VMware.vSphere.SsoAdmin/1.3.9
Problem:
certificatesList.Add(new X509Certificate2(Encoding.ASCII.GetBytes(cert)))
caused ASN1 Corrupted Data error in Linux.Root cause: Each certificate
cert
was converted from a byte array and stored as a string representation that was encoded with base-64 digits.Encoding.ASCII.GetBytes()
is to get the ASCII byte representation of the base64 string, not to restore the original byte array from the base64 string. It might work with Windows but not Linux. This problem was also tracked in https://github.com/dotnet/runtime/issues/47005.Solution: replaced it with
new X509Certificate2(Convert.FromBase64String(cert))
to restore the original byte array.