List of usage examples for org.apache.commons.net.pop3 POP3SClient setTrustManager
public void setTrustManager(TrustManager newTrustManager)
From source file:com.adaptris.mail.Pop3sReceiverFactory.java
@Override POP3SClient preConnectConfigure(POP3Client client) throws MailException { POP3SClient pop3s = (POP3SClient) super.preConnectConfigure(client); if (alwaysTrust()) { pop3s.setTrustManager(new AlwaysTrustManager()); }//from www . j a v a 2s. c o m if (getCipherSuites() != null) { pop3s.setEnabledCipherSuites(asArray(getCipherSuites())); } if (getProtocols() != null) { pop3s.setEnabledProtocols(asArray(getProtocols())); } return pop3s; }
From source file:org.apache.james.protocols.pop3.AbstractPOP3SServerTest.java
@Override protected POP3Client createClient() { POP3SClient client = new POP3SClient(true, BogusSslContextFactory.getClientContext()); client.setTrustManager(BogusTrustManagerFactory.getTrustManagers()[0]); return client; }
From source file:org.apache.james.protocols.pop3.AbstractStartTlsPOP3ServerTest.java
protected POP3SClient createClient() { POP3SClient client = new POP3SClient(false, BogusSslContextFactory.getClientContext()); client.setTrustManager(BogusTrustManagerFactory.getTrustManagers()[0]); return client; }