aspose file tools*
The moose likes Tomcat and the fly likes How do you specify which certificate to use? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "How do you specify which certificate to use?" Watch "How do you specify which certificate to use?" New topic
Author

How do you specify which certificate to use?

Darrin Smith
Ranch Hand

Joined: Aug 04, 2003
Posts: 276
Note that we are using Sun's Java System Application Server Platform Edition 8.1 that uses Tomcat under the covers, so I would think that the answer to this would be the same for SJSAS as Tomcat.

Here is my question: We have a signed certificate from Verisign. We imported this certificate using keytool and we verfied that the key is in the store.

When we go to an https port though, instead of seeing the signed certificate, we get sent back an auto-generated one that is unsigned.

How can we tell the server to use the signed certificate instead of the unsigned one?

Thanks!
[ October 25, 2005: Message edited by: Darrin Smith ]
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12835
    
    5
It has been a while since I did this but anyway - as I recall, in Tomcat I had to set command line defines giving these values. I used a line in Catalina.bat that looked like:
set JAVA_OPTS=
-Djavax.net.ssl.trustStore="c:\Data\Customer\keystore\clientkeys"
-Djavax.net.ssl.trustStorePassword="keystorePass"
-Djavax.net.ssl.keyStore="c:\Data\Customer\keystore\clientkeys"
-Djavax.net.ssl.keyStorePassword="keystorePass"

Bill
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

You can also do this from server.xml



What I don't see is how to choose which cert from within the store to use.
http://tomcat.apache.org/tomcat-5.5-doc/config/http.html


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Darrin Smith
Ranch Hand

Joined: Aug 04, 2003
Posts: 276
Thanks!

I'll pass this along and see how this goes.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How do you specify which certificate to use?