commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1086084 - /commons/proper/net/trunk/src/main/java/examples/mail/IMAPMail.java
Date Mon, 28 Mar 2011 00:42:53 GMT
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();
         }



Mime
View raw message