Petese Fabienne (CSE) wrote:

Hello,
I want to install a WebService on a HTTPS Server.
I don't want client authentification. I just want to use the SSL encryption.
What do I have to make ?
Need I special .jars ?
Thanks



1) On client-side java code, add to the beginning (modify the paths and password to fit your environment):


System.setProperty("javax.net.ssl.trustStore", "C:/Program Files/Apache Software Foundation/Tomcat 5.0/conf/ssl/client/client_truststore/cacerts");
System.setProperty("javax.net.ssl.trustStorePassword", "password");
System.setProperty("javax.net.ssl.keyStore", "C:/Program Files/Apache Software Foundation/Tomcat 5.0/conf/ssl/client/client_keystore/keystore");
System.setProperty("javax.net.ssl.keyStorePassword", "password");


2) On web server's tomcat server.xml (Set clientAuth="true" and modify paths to fit your environment):

<!-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -->
<Connector port="8443"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" debug="0" scheme="https" secure="true"
clientAuth="true" sslProtocol="TLS"
keystoreFile="C:\Program Files\Apache Software Foundation\Tomcat 5.0\conf\ssl\server\server_keystore\keystore"
keystorePass="password"
truststoreFile="C:\Program Files\Apache Software Foundation\Tomcat 5.0\conf\ssl\server\server_truststore\cacerts"
truststorePass="password" />



3) On client (client-side tomcat) tomcat-users.xml, add the line (change "<Common Name>" to fit your environment):


<user username="<Common Name>" password="password" roles="admin,manager" />


-- Lyndon Tiu

Reply via email to