/** * Initializes a new MailSSLSocketFactory with a given protocol. * Normally the protocol will be specified as "TLS". * * @param protocol The protocol to use * @throws NoSuchAlgorithmException if given protocol is not supported * @throws GeneralSecurityException for security errors */ public MailSSLSocketFactory(String protocol) throws GeneralSecurityException { // By default we do NOT trust all hosts. trustAllHosts = false; // Get an instance of an SSLContext. sslcontext = SSLContext.getInstance(protocol); // Default properties to init the SSLContext keyManagers = null; trustManagers = new TrustManager[] { new MailTrustManager() }; secureRandom = null; // Assemble a default SSLSocketFactory to delegate all API-calls to. newAdapteeFactory(); }
/** * Initializes a new MailSSLSocketFactory with a given protocol. * Normally the protocol will be specified as "TLS". * * @param protocol The protocol to use * @throws NoSuchAlgorithmException if given protocol is not supported * @throws GeneralSecurityException for security errors */ public MailSSLSocketFactory(String protocol) throws GeneralSecurityException { // By default we do NOT trust all hosts. trustAllHosts = false; // Get an instance of an SSLContext. sslcontext = SSLContext.getInstance(protocol); // Default properties to init the SSLContext keyManagers = null; trustManagers = new TrustManager[] { new MailTrustManager() }; secureRandom = null; // Assemble a default SSLSocketFactory to delegate all API-calls to. newAdapteeFactory(); }
/** * Initializes a new MailSSLSocketFactory with a given protocol. * Normally the protocol will be specified as "TLS". * * @param protocol The protocol to use * @throws NoSuchAlgorithmException if given protocol is not supported * @throws GeneralSecurityException for security errors */ public MailSSLSocketFactory(String protocol) throws GeneralSecurityException { // By default we do NOT trust all hosts. trustAllHosts = false; // Get an instance of an SSLContext. sslcontext = SSLContext.getInstance(protocol); // Default properties to init the SSLContext keyManagers = null; trustManagers = new TrustManager[] { new MailTrustManager() }; secureRandom = null; // Assemble a default SSLSocketFactory to delegate all API-calls to. newAdapteeFactory(); }
/** * Initializes a new MailSSLSocketFactory with a given protocol. * Normally the protocol will be specified as "TLS". * * @param protocol The protocol to use * @throws NoSuchAlgorithmException if given protocol is not supported */ public MailSSLSocketFactory(String protocol) throws GeneralSecurityException { // By default we do NOT trust all hosts. trustAllHosts = false; // Get an instance of an SSLContext. sslcontext = SSLContext.getInstance(protocol); // Default properties to init the SSLContext keyManagers = null; trustManagers = new TrustManager[] { new MailTrustManager() }; secureRandom = null; // Assemble a default SSLSocketFactory to delegate all API-calls to. newAdapteeFactory(); }
/** * Initializes a new MailSSLSocketFactory with a given protocol. * Normally the protocol will be specified as "TLS". * * @param protocol The protocol to use * @throws NoSuchAlgorithmException if given protocol is not supported * @throws GeneralSecurityException for security errors */ public MailSSLSocketFactory(String protocol) throws GeneralSecurityException { // By default we do NOT trust all hosts. trustAllHosts = false; // Get an instance of an SSLContext. sslcontext = SSLContext.getInstance(protocol); // Default properties to init the SSLContext keyManagers = null; trustManagers = new TrustManager[] { new MailTrustManager() }; secureRandom = null; // Assemble a default SSLSocketFactory to delegate all API-calls to. newAdapteeFactory(); }
/** * Initializes a new MailSSLSocketFactory with a given protocol. * Normally the protocol will be specified as "TLS". * * @param protocol The protocol to use * @throws NoSuchAlgorithmException if given protocol is not supported * @throws GeneralSecurityException for security errors */ public MailSSLSocketFactory(String protocol) throws GeneralSecurityException { // By default we do NOT trust all hosts. trustAllHosts = false; // Get an instance of an SSLContext. sslcontext = SSLContext.getInstance(protocol); // Default properties to init the SSLContext keyManagers = null; trustManagers = new TrustManager[] { new MailTrustManager() }; secureRandom = null; // Assemble a default SSLSocketFactory to delegate all API-calls to. newAdapteeFactory(); }
/** * Initializes a new MailSSLSocketFactory with a given protocol. * Normally the protocol will be specified as "TLS". * * @param protocol The protocol to use * @throws NoSuchAlgorithmException if given protocol is not supported * @throws GeneralSecurityException for security errors */ public MailSSLSocketFactory(String protocol) throws GeneralSecurityException { // By default we do NOT trust all hosts. trustAllHosts = false; // Get an instance of an SSLContext. sslcontext = SSLContext.getInstance(protocol); // Default properties to init the SSLContext keyManagers = null; trustManagers = new TrustManager[] { new MailTrustManager() }; secureRandom = null; // Assemble a default SSLSocketFactory to delegate all API-calls to. newAdapteeFactory(); }
/** * Initializes a new MailSSLSocketFactory with a given protocol. * Normally the protocol will be specified as "TLS". * * @param protocol The protocol to use * @throws NoSuchAlgorithmException if given protocol is not supported * @throws GeneralSecurityException for security errors */ public MailSSLSocketFactory(String protocol) throws GeneralSecurityException { // By default we do NOT trust all hosts. trustAllHosts = false; // Get an instance of an SSLContext. sslcontext = SSLContext.getInstance(protocol); // Default properties to init the SSLContext keyManagers = null; trustManagers = new TrustManager[] { new MailTrustManager() }; secureRandom = null; // Assemble a default SSLSocketFactory to delegate all API-calls to. newAdapteeFactory(); }