For purpose of testing I need to enable SSL on IIS8 (On Amazon servers). I created a test key using IIS and I exported that key in *.pfx format. Now in Load Balancer setting I need to have that key converted to *.PEM format. I did just that using https://www.sslshopper.com/ssl-converter.html
When I open newly generated *.PEM key I have two fields: -----BEGIN PRIVATE KEY----- key is here... -----END PRIVATE KEY-----
and also I have
-----BEGIN CERTIFICATE----- certificate is in here... -----END CERTIFICATE-----
Now when I enter those values in LoadBalancer, it always complains with:
Invalid Public Key Certificate.
I have tried pasting both values with ---BEGIN and without to same result...
What is going on?
For everybody already had .pem format and still getting "Invalid Public Key Certificate", here is my solution.
The certificate chain bundle is actually formed by 2 certificates, one after the other: inverting the order of the two worked for me.
This link provided me with the solution:
https://forums.aws.amazon.com/thread.jspa?threadID=56937
The tech support from Amazon detailed what commands need to be used. Basically use first which is: --This will get you a key openssl pkcs12 -in filename.pfx -out private.key.1 -nodes -nocerts
and use this one as will to get a certificate itself: openssl pkcs12 -in filename.pfx -clcerts -nokeys -out cert.pem
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With