Hi Oliver!

Oliver Schoenwald <[EMAIL PROTECTED]> 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("javax.net.ssl.trustStore", trustStore.getAbsolutePath());
System.setProperty("javax.net.ssl.keyStore", keyStore.getAbsolutePath());
System.setProperty("javax.net.ssl.keyStoreType", "PKCS12");
System.setProperty("javax.net.ssl.keyStorePassword", keyStorePassword);

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

regards
Markus


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to