This week's book giveaway is in the Testing forum.
We're giving away four copies of The Way of the Web Tester: A Beginner's Guide to Automating Tests and have Jonathan Rasmusson on-line!
See this thread for details.
Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic peer not authenticated

Sunil Linga
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I am getting below exception while connecting to an URL over SSL using httpclient 3 from our application running on WAS 6 and j2sdk 1.4.

[4/15/11 11:16:15:103 EDT] 00000038 SystemErr peer not authenticated
at xxxxxxxx.common.StrictSSLProtocolSocketFactory.verifyHostname(Unknown Source)
at xxxxxxxx.common.StrictSSLProtocolSocketFactory.createSocket(Unknown Source)
at org.apache.commons.httpclient.HttpConnection.tunnelCreated(
at org.apache.commons.httpclient.HttpMethodDirector.executeConnect(
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(
at org.apache.commons.httpclient.HttpClient.executeMethod(
at org.apache.commons.httpclient.HttpClient.executeMethod(

Strangely, the same piece of code is working fine when ran as a stand alone outside the application.

Below is the code snippet I am using..

StrictSSLProtocolSocketFactory stricthttps = new StrictSSLProtocolSocketFactory(true);
stricthttps.setDN("CN=***, OU=***, OU=***, OU=***, O=***, C=***, SERIALNUMBER=***");
Protocol.registerProtocol("https", new Protocol("https", (ProtocolSocketFactory)stricthttps, Integer.parseInt("443")));
HttpClient httpclient = new HttpClient();
httpclient.getHostConfiguration().setProxy(host, port);
httpreq = new PostMethod("");
StringRequestEntry myString = new StringRequestEntry(message);


Any help in this is greatly appreciated!

Thanks in advanced!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic