Return-Path: X-Original-To: apmail-hc-httpclient-users-archive@www.apache.org Delivered-To: apmail-hc-httpclient-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AA2D69AEE for ; Thu, 27 Oct 2011 04:58:33 +0000 (UTC) Received: (qmail 87422 invoked by uid 500); 27 Oct 2011 04:58:32 -0000 Delivered-To: apmail-hc-httpclient-users-archive@hc.apache.org Received: (qmail 87369 invoked by uid 500); 27 Oct 2011 04:58:22 -0000 Mailing-List: contact httpclient-users-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-users@hc.apache.org Received: (qmail 87360 invoked by uid 99); 27 Oct 2011 04:58:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Oct 2011 04:58:18 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of aartigauba@gmail.com designates 209.85.213.51 as permitted sender) Received: from [209.85.213.51] (HELO mail-yw0-f51.google.com) (209.85.213.51) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Oct 2011 04:58:12 +0000 Received: by ywp31 with SMTP id 31so2275327ywp.10 for ; Wed, 26 Oct 2011 21:57:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=dJ1+X90lvTe1UCjtQPRsn9Vgk7sKPs+flfzhu2uNZO0=; b=VBZy7HAjgaAXG0eSiHkefldl+DT6yjYIASki8zlvdUWUpzhy+/uRm2UDY+sPslC6nN PW2KiZoyAdJXsp6Y2YBZ8ty6NQ3sqlCgIjf16h2c9jxsqbg4mjt+VU7N2btlSXUaDiyw 4ih2bIJ9XHBkv/uTs4vNnhZDd/HWgNApfI+XY= MIME-Version: 1.0 Received: by 10.182.13.1 with SMTP id d1mr6037823obc.74.1319691471232; Wed, 26 Oct 2011 21:57:51 -0700 (PDT) Received: by 10.182.122.97 with HTTP; Wed, 26 Oct 2011 21:57:51 -0700 (PDT) Date: Thu, 27 Oct 2011 10:27:51 +0530 Message-ID: Subject: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated exception From: aarti gauba To: httpclient-users@hc.apache.org Content-Type: multipart/alternative; boundary=f46d044402f05b206104b0409d7f --f46d044402f05b206104b0409d7f Content-Type: text/plain; charset=ISO-8859-1 Hi, I am trying to send a https request for attachment download using org.apache.http.impl.client.DefaultHttpClient (using jars-httpclient-4.1.2.jar, httpcore-4.1.2.jar). By adding a cookie to the request, i am able to authenticate and able to download attachments on my local machine(windows). However on the dev machine(linux box), i am getting "javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated" exception everytime i try to download the documents. We are using same self signed certificates on both local and dev enviornments. I have also tried code which will trust all hostnames and trust all certificates, it again worked on my local machine but did not work on dev box. Following exception im getting with ssl debug on : javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated at com.sun.net.ssl.internal.ssl.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:352) at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:128) at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:397) .......................... .......................... (Unknown Source) at com.certicom.tls.interfaceimpl.TLSConnectionImpl.closeWriteHandler(Unknown Source) at com.certicom.tls.interfaceimpl.TLSConnectionImpl.close(Unknown Source) at javax.net.ssl.impl.SSLSocketImpl.close(Unknown Source) at weblogic.net.http.HttpClient.closeServer(HttpClient.java:540) at weblogic.net.http.KeepAliveCache$1.run(KeepAliveCache.java:111) at java.util.TimerThread.mainLoop(Timer.java:512) at java.util.TimerThread.run(Timer.java:462) > https url for a document HttpResponse response = httpclient.execute(httpget); HttpEntity rsentity = response.getEntity(); rsentity.writeTo(outputStream); I am getting the exception on the second line itself(httpclient.execute(httpget)). Any ideas? Thanks, Aarti --f46d044402f05b206104b0409d7f--