views:

372

answers:

1

I am trying to import Gmails smtp certificate for use with Jira, but I get this error when importing using Javas keytool.

I used openssl to get the certificate, everything between ----Begin Certificate---- and ----End Certificate---- (inclusive). I also attempted to create an x.509 certificate using Windows Certificate Manager, but still get this error. I have verified that there are no extra whitespaces in the file.

I have seen many people with this problem online, but none of the solutions seem to work for me. Any help would be appreciated.

Thanks

A: 

openssl x509 -outform der -in foo.pem -out foo.der

Then use the DER-encoded output certificate.

Borealid
I was really hoping this would work, but I jut keep getting the same error. Here is what I'm doing exactly. openssl s_client -connect smtp.gmail.com:465I copy that to a file called gmail.pem openssl x509 -outform der -in gmail.pem -out gmail.der keytool -import -file pathTo/gmail.der -keystore pathTo/cacerts
dbbooh01
This actually did work, I forgot the argument -trustcacerts when using keytool. Thanks for the help
dbbooh01