> Might be worth looking at the HTTP Client contributed code section on the
Apache website -
> I think they have some examples of SSL and Socket Factory.
Mines working when I set it by the hand.
Doing this :
System.setProperty("ssl.SocketFactory.provider",
"com.glowria.https.SSLv3SocketFactory");
Should set up my factory, but that don't work while in jMeter
My test use HTTPClient, SSLSocket (directly), and finally
URL.openConnection() (which use URLConnection, and HTTPUrlConnection)
My factory is the following (that is just a facade to the real factory). I
don't know what is done in jMeter, but it seems to completly ignore my
factory.
package com.glowria.https;
import java.io.IOException;
import java.net.InetAddress;
import java.net.Socket;
import java.net.UnknownHostException;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
import com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl;
public class SSLv3SocketFactory extends SSLSocketFactory {
private final static String[] enabledProtocols = {
"SSLv3", "SSLv2Hello"
};
private final SSLSocketFactoryImpl impl = new SSLSocketFactoryImpl();
private final Socket setUp(Socket sock) {
((SSLSocket) sock).setEnabledProtocols(enabledProtocols);
return sock;
}
@Override
public Socket createSocket() {
return setUp(impl.createSocket());
}
@Override
public Socket createSocket(InetAddress arg0, int arg1, InetAddress arg2,
int arg3) throws IOException {
return setUp(impl.createSocket(arg0, arg1, arg2, arg3));
}
@Override
public Socket createSocket(InetAddress arg0, int arg1) throws IOException
{
return setUp(impl.createSocket(arg0, arg1));
}
@Override
public Socket createSocket(Socket arg0, String arg1, int arg2, boolean
arg3)
throws IOException {
return setUp(impl.createSocket(arg0, arg1, arg2, arg3));
}
@Override
public Socket createSocket(String arg0, int arg1, InetAddress arg2, int
arg3)
throws IOException {
return setUp(impl.createSocket(arg0, arg1, arg2, arg3));
}
@Override
public Socket createSocket(String arg0, int arg1) throws IOException,
UnknownHostException {
return setUp(impl.createSocket(arg0, arg1));
}
@Override
public boolean equals(Object obj) {
return impl.equals(obj);
}
@Override
public String[] getDefaultCipherSuites() {
return impl.getDefaultCipherSuites();
}
@Override
public String[] getSupportedCipherSuites() {
return impl.getSupportedCipherSuites();
}
@Override
public int hashCode() {
return impl.hashCode();
}
@Override
public String toString() {
return getClass().getName().toString() + "(" + impl.toString() +")";
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]