• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Multiple SSL Certificates in Single Keystore File Possible?

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have an Apache Tomcat 6.0 server hosting 3 sites (all internal on a test subnet), all of which require SSL. Is it possible to have 3 different SSL certs imported into my single .keystore file? If so, how do I specify what site uses what certificate? I've read about keyAlias parameter but I can't seem to get it to work. I could use a wildcard cert if they all had the same domain suffix but they do not (for example, I have https://mysite.mydomain.org, https://myservername, https://myserverIP).

Any information would be appreciated.

Thanks
 
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think a bigger problem is that the way SSL works allows only one cert per server machine (or server IP ?). So the limitation isn't in J2EE, it's in SSL as a whole.
 
Greenhorn
Posts: 2
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Were you able to resolve this issue?
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:I think a bigger problem is that the way SSL works allows only one cert per server machine (or server IP ?).


I think it's one certificate per IP address.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes,
to import use
keytool -importcert -file your1st.crt -alias 1st.site.com -keystore TheKeyStore.keystore -storepass pass
keytool -importcert -file your2nd.crt -alias 2ndt.site.com -keystore TheKeyStore.keystore -storepass pass

to list the certificates
keytool -list -v -keystore TheKeyStore.keystore -storepass pass
 
Harri Kw
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Daya Moon wrote:yes,
to import use
keytool -importcert -file your1st.crt -alias 1st.site.com -keystore TheKeyStore.keystore -storepass pass
keytool -importcert -file your2nd.crt -alias 2ndt.site.com -keystore TheKeyStore.keystore -storepass pass

to list the certificates
keytool -list -v -keystore TheKeyStore.keystore -storepass pass




Yes but you're not allowed to use the same port with different alias'.
The application would be using the same service with different cnames.
Unless i'm missing something here.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic