views:

415

answers:

2

I am trying to use a Maven 2 repository via SSL secured with a self-signed certificate. I followed the instructions at HTTPS and Self-Signed Certificates in Java but I doesn't to work.

I think its because the certificate is a wild-card certificate. So I wonder if I should be doing something different to import the wild-card certificate?

A: 
  • try using -Djavax.net.debug=ssl as that page suggests and include the output
  • validate your assumption that the problem is the wildcard - try it against a non-wildcard self-signed certification
Robert Munteanu
I'm having similar problems with Maven and self-signed certs, and running Maven with -Djavax.net.debug=ssl seems to have no effect.
matt b
A: 

The issue was not the use of a wild-card certificate after all. I had to import the CA certificate I used to sign the server certificate into the jssecacerts keystore rather than cacerts:

keytool -keystore %JAVA_HOME%\jre\lib\security\jssecacerts -import -file cacert.pem
bmatthews68