Override/replace com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl by custo

Friends,

I have created a custom MySSLProtocolSocketFactory class which implements ProtocolSocketFactory class .I have implemented the overloaded createSocket() method of this class. However on using this class in org.apache.commons.httpclient.protocol.Protocol class , the jvm seems to pick up com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl class to implement the socket connection .

Is there any way to bypass the default implementation and enable my custom MySSLProtocolSocketFactory class ?

I usedd the following code to check the default SSLSocketFactory .

public class Test

{

public static void main (String args[])

{

Object fact=SSLSocketFactory.getDefault();

System.out.println(fact.getClass().toString());

}

}

Can anybody guide me for any pointers to resolve the same ?

[885 byte] By [dynamicdhiraja] at [2007-11-27 10:55:17]
# 1

Protocol.registerProtocol("https",

new Protocol("https", new MySSLSocketFactory(), 443));

See: http://jakarta.apache.org/commons/httpclient/sslguide.html

Message was edited by:

Immortius

Immortiusa at 2007-7-29 11:55:25 > top of Java-index,Security,Java Secure Socket Extension (JSSE)...