Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Java connect to wildcard ssl

Tags:

java

ssl

wildcard

We wish to buy a wild-card SSL certificate as we have a lot of sub-domains. However I don't know if Java trusts wild-card certificates. As people connect into our API via SSL it will not be sufficient for us to force all third parties we communicate with to add our SSL certificate into their local truststore.

At the moment I'm facing a dilemma to buy a wildcard certificate from a java trusted issuer or buy multiple certs one per sub-domain.

Do other languages also have a truststore? If so does anyone know if wildcard certificates work with them also.

like image 219
Wes Avatar asked Jul 02 '10 14:07

Wes


1 Answers

The default implementation in Sun's JSSE doesn't support wildcard. You need to write your own X509TrustManager to handle wildcard.

However, Java supports SAN (Subject Alternative Names) since Java 5. If you have less than 20 names, you can get one certificate for all of them. It may be cheaper than a wildcard cert.

like image 125
ZZ Coder Avatar answered Sep 28 '22 09:09

ZZ Coder