From: Kab <ka...@us...> - 2004-03-31 20:09:22
|
User: kabkhan Date: 04/03/31 11:57:34 Modified: src/java/org/jboss/mail/smtp/handlers CmdSTARTTLS.java Log: Keystore for TLS is now put in a JBossSX security domain Revision Changes Path 1.7 +4 -2 jboss-mail/src/java/org/jboss/mail/smtp/handlers/CmdSTARTTLS.java Index: CmdSTARTTLS.java =================================================================== RCS file: /cvsroot/jboss/jboss-mail/src/java/org/jboss/mail/smtp/handlers/CmdSTARTTLS.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- CmdSTARTTLS.java 30 Mar 2004 14:18:38 -0000 1.6 +++ CmdSTARTTLS.java 31 Mar 2004 19:57:34 -0000 1.7 @@ -48,8 +48,10 @@ writer.println("220 Ready to start TLS"); java.security.Security.addProvider( new com.sun.net.ssl.internal.ssl.Provider()); // System.setProperty("javax.net.debug", "ssl,handshake"); - SSLSocketFactory factory = (SSLSocketFactory)SSLSocketFactory.getDefault(); - Socket oldSocket = ((SMTPProtocolInstance)protocol).getServerThread().getSocket(); + SMTPProtocolInstance smtpProtocol = (SMTPProtocolInstance)protocol; + SSLSocketFactory factory = + (SSLSocketFactory)smtpProtocol.getProperty(SMTPConstants.SSL_SOCKET_FACTORY); + Socket oldSocket = smtpProtocol.getServerThread().getSocket(); final SSLSocket newSocket = (SSLSocket)factory.createSocket(oldSocket, oldSocket.getLocalAddress().getHostName(), |