tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Plail <>
Subject Re: How to add client certificate to use in Servlets
Date Thu, 17 Nov 2005 11:20:12 GMT
Hi Oliver!

Oliver Schoenwald <> writes:
> I'm using Tomcat 5.5.4 and have implemented a webapplication that
> connects to other servers to look for the existence of certain URLs
> and to load soap-data using the Jakarta Axis-Library.  Now there is a
> remote server reachable via an https-adress, and that server should
> accept client certificate-based authentication. And here is where I'm
> lost for now. I have a client certificate in pem-format (but I can
> have any other format, too, if I need).
> So far I only found information about how to add server certificates
> to a keystore-file and how to set tomcat to use that file for its own
> https-connector.
> Question: How do I tell Tomcat to use that client certificate when a
> servlet connects to that remote server? What format should the client
> certificate have?

Do you want to use a webservice on the remote server or download a file
via https? In the latter case I can't help, but in the former case it's
as simple as that:

System.setProperty("", trustStore.getAbsolutePath());
System.setProperty("", keyStore.getAbsolutePath());
System.setProperty("", "PKCS12");
System.setProperty("", keyStorePassword);

The truststore contains the certificates of servers you trust and the
keystore contains your certificate that is trusted by the server.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message