[ 
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)

Reply via email to