1
System.setProperty("javax.net.ssl.trustStore", "cacerts.jks");

SSLSocketFactory ssf = (SSLSocketFactory) SSLSocketFactory.getDefault();

I would want to implement my SSL socket for my server and client. There is this System.setproperty i am trying to replace with bufferedreader like stuff to read in the certificate. Can it be done?

newbieprogrammer
  • 848
  • 7
  • 23
  • 46

1 Answers1

0

Unsure about reading the certificate, but you can make use of VM Arguments. Eg: -DmyProp='propValue'

Refer: http://www.avajava.com/tutorials/lessons/whats-the-difference-between-program-arguments-and-vm-arguments.html

Pavan Kumar
  • 4,182
  • 1
  • 30
  • 45