You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Jörg Weule (JIRA)" <ji...@apache.org> on 2016/06/13 08:30:21 UTC
[jira] [Commented] (NET-593) HostnameVerifier is checking for ip
addess
[ https://issues.apache.org/jira/browse/NET-593?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15326989#comment-15326989 ]
Jörg Weule commented on NET-593:
--------------------------------
I expcet the following HostnameVerifier to print the hostname of the smtpclient.connect(hostname,port).
public static class TinyHostnameVerifier implements HostnameVerifier
{
@Override
public boolean verify(String expectedHostName, SSLSession sslSession)
{
System.out.println(String.format("INFO : HostnameVerifier.verify(%s, ...)", expectedHostName));
return true ;
}
}
asmtpClient = new AuthenticatingSMTPClient(false, context);
asmtpClient.setHostnameVerifier(new TinyHostnameVerifier() );
asmtpClient.connect(hostname, port);
> HostnameVerifier is checking for ip addess
> ------------------------------------------
>
> Key: NET-593
> URL: https://issues.apache.org/jira/browse/NET-593
> Project: Commons Net
> Issue Type: Bug
> Components: SMTP
> Affects Versions: 3.4
> Reporter: Jörg Weule
>
> When TLS is used (not StartTLS) on port 465, the HostnameVerifier is checking for the ip address, not the hostname. This results in a failure on each connection.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)