Return-Path: Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: (qmail 28696 invoked from network); 28 Mar 2011 00:43:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 Mar 2011 00:43:15 -0000 Received: (qmail 48125 invoked by uid 500); 28 Mar 2011 00:43:15 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 48066 invoked by uid 500); 28 Mar 2011 00:43:15 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 48059 invoked by uid 99); 28 Mar 2011 00:43:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Mar 2011 00:43:15 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Mar 2011 00:43:14 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id B7A562388994; Mon, 28 Mar 2011 00:42:53 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1086084 - /commons/proper/net/trunk/src/main/java/examples/mail/IMAPMail.java Date: Mon, 28 Mar 2011 00:42:53 -0000 To: commits@commons.apache.org From: sebb@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110328004253.B7A562388994@eris.apache.org> Author: sebb Date: Mon Mar 28 00:42:53 2011 New Revision: 1086084 URL: http://svn.apache.org/viewvc?rev=1086084&view=rev Log: Add comments re using trust managers Modified: commons/proper/net/trunk/src/main/java/examples/mail/IMAPMail.java Modified: commons/proper/net/trunk/src/main/java/examples/mail/IMAPMail.java URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/examples/mail/IMAPMail.java?rev=1086084&r1=1086083&r2=1086084&view=diff ============================================================================== --- commons/proper/net/trunk/src/main/java/examples/mail/IMAPMail.java (original) +++ commons/proper/net/trunk/src/main/java/examples/mail/IMAPMail.java Mon Mar 28 00:42:53 2011 @@ -54,6 +54,10 @@ public final class IMAPMail if (proto != null) { System.out.println("Using secure protocol: " + proto); imap = new IMAPSClient(proto, true); // implicit + // enable the next line if the server certificate has expired: +// ((IMAPSClient) imap).setTrustManager(TrustManagerUtils.getValidateServerCertificateTrustManager()); + // OR enable the next line if the server uses a self-signed certificate +// ((IMAPSClient) imap).setTrustManager(TrustManagerUtils.getAcceptAllTrustManager()); } else { imap = new IMAPClient(); }