You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by ma...@gmail.com on 2009/02/13 17:37:08 UTC

Fwd: Fwd: Httpclient sslv3 & bad_record_mac error

I am trying to get httpClient work for sslv3 connection currently we are  
connecting to sslv2 and it works but connecting to sslv3 does not work.

The problem is very similar to the one describe in the following link

http://www.mailinglistarchive.com/httpclient-user@jakarta.apache.org/msg00380.html

this is the following error I get

javax.net.ssl.SSLException: Received fatal alert: bad_record_mac


import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.Header;
import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.commons.httpclient.protocol.Protocol;
import org.apache.commons.httpclient.protocol.ProtocolSocketFactory;
import org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory;


public class SSLv3Testing {

final static String SSL_TEST_URL = "https://mylocalwebsite/index.html";

public static void main(String[] args) throws Exception {


GetMethod method = new GetMethod(SSL_TEST_URL);
HttpClient http = new HttpClient();

long t0 = System.currentTimeMillis();
int status = http.executeMethod(method); // This is the line i get a the  
error
}
}


Any help on this topic is greatly appreciated.
Thanks,
PM