runtime config of ssl



Hi,

I have a problem that I think someone must have a graceful solution
for.
I want to do runtime configuration of the Security Provider so that I
do not have to change the code to run on different platforms. Here is
the "ugly" code that I am using now:

// create new URL and connect
java.security.Security.addProvider(new
com.sun.net.ssl.internal.ssl.Provider());
// com.ibm.jsse.IBMJSSEProvider());

System.getProperties().put("java.protocol.handler.pkgs",

"com.sun.net.ssl.internal.www.protocol");
//
"com.ibm.net.ssl.internal.www.protocol");


Please suggest graceful alternatives.

mike.

.