I followed the tutorial at SSL/TLS-based RMI Socket Factories
And I have been able to generate a keystore and trustore.
For the moment only the Server authenticates itself.
When I put the keystore and trustore file in the root folder of my Eclipse project and I launch manually in windows console (or adding VM arguments in Eclipse) :
$ java -Djavax.net.ssl.trustStore=truststore -Djavax.net.ssl.trustStorePassword=trustword RmiRegistry &
$ java -Djavax.net.ssl.keyStore=keystore -Djavax.net.ssl.keyStorePassword=password HelloImpl &
$ java -Djavax.net.ssl.trustStore=truststore -Djavax.net.ssl.trustStorePassword=trustword HelloClient
Everything works correctly. Now if I want to send my application (it is for an assignment). Where can I put the trustore and keystore and how can I allow the corrector to launch
$ java RmiRegistry &
rather than
$ java -Djavax.net.ssl.trustStore=truststore -Djavax.net.ssl.trustStorePassword=trustword RmiRegistry &
You will need to add a new trusted authority to your Java Runtime Environment’s
cacertsfile. This file is found$JRE_HOME/lib/security/. The default password ischangeit.Alternatively you can configure the properties on start up in your code: