Skip to content

Commit 215a8f4

Browse files
Martin Vigliaroloanaiberta
authored andcommitted
Last HTTPClient dependency fixed
(cherry picked from commit c94e06f)
1 parent 6b8deb8 commit 215a8f4

File tree

3 files changed

+0
-62
lines changed

3 files changed

+0
-62
lines changed

gxmail/src/main/java/com/genexus/internet/POP3Session.java

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -126,24 +126,6 @@ private void connectNormal() throws GXMailException
126126
login();
127127
}
128128

129-
// private Socket getConnectionSocket(int type) throws UnknownHostException, IOException
130-
// {
131-
// System.setProperty("HTTPClient.sslUseTLS", "false");
132-
// InetAddress ipAddr = InetAddress.getByName(pop3Host.trim());
133-
// switch(type)
134-
// {
135-
// case CONN_NORMAL:
136-
// return new Socket(pop3Host.trim(), pop3Port);
137-
// case CONN_TLS:
138-
// System.setProperty("HTTPClient.sslUseTLS", "true");
139-
// return HTTPClient.SSLManager.getSSLConnection(false).getSSLSocket(ipAddr, pop3Port);
140-
// case CONN_SSL:
141-
// HTTPClient.ISSLConnection connection = HTTPClient.SSLManager.getSSLConnection(false);
142-
// return connection.processSSLSocket(connection.getSSLSocket(ipAddr, pop3Port), ipAddr.getHostName(), pop3Port);
143-
// }
144-
// return new Socket(pop3Host.trim(), pop3Port);
145-
// }
146-
147129
private Socket getConnectionSocket(int type) throws UnknownHostException, IOException
148130
{
149131
InetAddress ipAddr = InetAddress.getByName(pop3Host.trim());

gxmail/src/main/java/com/genexus/internet/SMTPSession.java

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -441,24 +441,6 @@ public void run()
441441
}
442442
}
443443

444-
// private Socket getConnectionSocket(int type) throws UnknownHostException, IOException
445-
// {
446-
// System.setProperty("HTTPClient.sslUseTLS", "false");
447-
// InetAddress ipAddr = InetAddress.getByName(host.trim());
448-
// switch(type)
449-
// {
450-
// case CONN_NORMAL:
451-
// return new Socket(host.trim(), port);
452-
// case CONN_TLS:
453-
// System.setProperty("HTTPClient.sslUseTLS", "true");
454-
// return HTTPClient.SSLManager.getSSLConnection(false).getSSLSocket(ipAddr, port);
455-
// case CONN_SSL:
456-
// HTTPClient.ISSLConnection connection = HTTPClient.SSLManager.getSSLConnection(false);
457-
// return connection.processSSLSocket(connection.getSSLSocket(ipAddr, port), ipAddr.getHostName(), port);
458-
// }
459-
// return new Socket(host.trim(), port);
460-
// }
461-
462444
private Socket getConnectionSocket(int type) throws UnknownHostException, IOException
463445
{
464446
InetAddress ipAddr = InetAddress.getByName(host.trim());

java/src/main/java/com/genexus/internet/HttpClientJavaLib.java

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
import java.net.URISyntaxException;
66
import java.net.UnknownHostException;
77
import java.nio.charset.StandardCharsets;
8-
import java.security.KeyManagementException;
9-
import java.security.KeyStoreException;
10-
import java.security.NoSuchAlgorithmException;
118
import java.util.*;
129
import com.genexus.servlet.http.ICookie;
1310
import com.genexus.util.IniFile;
@@ -32,8 +29,6 @@
3229
import org.apache.http.conn.ConnectionKeepAliveStrategy;
3330
import org.apache.http.conn.socket.ConnectionSocketFactory;
3431
import org.apache.http.conn.socket.PlainConnectionSocketFactory;
35-
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
36-
import org.apache.http.conn.ssl.TrustSelfSignedStrategy;
3732
import org.apache.http.cookie.Cookie;
3833
import org.apache.http.entity.ByteArrayEntity;
3934
import org.apache.http.impl.auth.NTLMSchemeFactory;
@@ -193,27 +188,6 @@ private String getURLValid(String url) {
193188
}
194189
}
195190

196-
// private static SSLConnectionSocketFactory getSSLSecureInstance() {
197-
// try {
198-
// SSLContext sslContext = SSLContextBuilder
199-
// .create()
200-
// .loadTrustMaterial(new TrustSelfSignedStrategy())
201-
// .build();
202-
// return new SSLConnectionSocketFactory(
203-
// sslContext,
204-
// new String[] { "TLSv1", "TLSv1.1", "TLSv1.2" },
205-
// null,
206-
// SSLConnectionSocketFactory.getDefaultHostnameVerifier());
207-
// } catch (NoSuchAlgorithmException | KeyManagementException | KeyStoreException e) {
208-
// e.printStackTrace();
209-
// }
210-
// return new SSLConnectionSocketFactory(
211-
// SSLContexts.createDefault(),
212-
// new String[] { "TLSv1", "TLSv1.1", "TLSv1.2"},
213-
// null,
214-
// SSLConnectionSocketFactory.getDefaultHostnameVerifier());
215-
// }
216-
217191
private CookieStore setAllStoredCookies() {
218192
ICookie[] webcookies;
219193

0 commit comments

Comments
 (0)