I am trying to build an email client app in android and right now i want to configure the javaMail part.
i am trying to establish the connection with the imap server
I've lost so many days searching for a solution, and this post was helps to me. I had the same problem. I created a pem file like here, and then, the cert file .pem, was incrusted in cacert file (a copy called TrustStore.jks) with this command:
keytool.exe -import -noprompt -keystore TrustStore.jks -storepass changeit ^ -alias DOMAINNAME -file MYCERTFILE.pem
(DOMAINNAME must be replace by hostname -this trick is very important-, and MYCERTFILE by file recent create...)
I hope that this solution can helps to somebody.