martin wrote:
Szeraax wrote:
It looks like using .key and a .cer (but only the Base64 encoded version) worked for me. For operability, the other encoding might be good for WinSCP to read so that people don't have to install a cert and then export from the certstore with the right encoding (like I did).
So what particular format is not working? How do you generate it?
See attached image. The file I had was a DER encoded binary. I have tested and found you can convert the DER binary to Base-64 encoded X.509 (the other option in the picture below) by:
1) Convert to base 64
2) Prepend -----BEGIN CERTIFICATE-----\r\n
3) Append \r\n-----END CERTIFICATE-----\r\n
So if read a file and do the same thing, you should be able to load cert as your code already does from there. If you decide to program this in, I will be happy to test, verify, and report. Also, should you need it, I can send a copy of my DER cert and you can test decoding it.