CertificateDsc icon indicating copy to clipboard operation
CertificateDsc copied to clipboard

When using content option on PfxImport with certificate twice in pfx private key gets lost

Open manschwetusCF opened this issue 3 years ago • 1 comments

I generated my pfx file with ansible and included the fullchain also, to ensure no intermediate certificates are missing. But the fullchain file also includes the certificate itself, so the certificate gets added a second time to the pfx file, this seems to break the private key import using Import-PfxCertificateEx @importPfxCertificateParameters -Base64Content $Content. As I don't see a point to get this point handled in code, I think this should be documented.

manschwetusCF avatar Mar 08 '22 09:03 manschwetusCF

This will result in such an error for example: https://techcommunity.microsoft.com/t5/iis-support-blog/error-hresult-0x80070520-when-adding-ssl-binding-in-iis/ba-p/377281

manschwetusCF avatar Mar 08 '22 09:03 manschwetusCF