the-thing commented on PR #26:
URL: https://github.com/apache/mina/pull/26#issuecomment-1539019441

   I applied the changes manually to 2.2.X. The peerAddress session attribute 
has been removed, which was used to get the hostname for the SSL engine.
   
   2.1.X - org.apache.mina.filter.ssl.SslHandler#init
   
   ```
   InetSocketAddress peer = (InetSocketAddress) 
session.getAttribute(SslFilter.PEER_ADDRESS);
   
   // Create the SSL engine here
   if (peer == null) {
       sslEngine = sslFilter.sslContext.createSSLEngine();
   } else {
       sslEngine = sslFilter.sslContext.createSSLEngine(peer.getHostName(), 
peer.getPort());
   }
   ```
   
   
   in 2.2.X - org.apache.mina.filter.ssl.SslFilter#createEngine
   
   ```
   SSLEngine sslEngine = (addr != null) ? 
sslContext.createSSLEngine(addr.getHostString(), addr.getPort()) : 
sslContext.createSSLEngine();
   ```
   
   #getHostString seems to be the problem as it is resolved IP address instead 
the actual host.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org

Reply via email to