You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Dave Rushall (JIRA)" <ji...@apache.org> on 2008/09/10 13:02:46 UTC
[jira] Created: (GERONIMO-4294) mail.pop3s.socketFactory.class is
ignored
mail.pop3s.socketFactory.class is ignored
-----------------------------------------
Key: GERONIMO-4294
URL: https://issues.apache.org/jira/browse/GERONIMO-4294
Project: Geronimo
Issue Type: Bug
Security Level: public (Regular issues)
Components: mail
Environment: geronimo-javamail_1.4_mail-1.4.jar
IBM JRE 6 SR 1
Windows XP
Reporter: Dave Rushall
I am attempting to connect to a pop3s store using a custom SSLSocketFactory by setting the following in my session properties:
mail.pop3s.socketFactory.class=test.TestSSLSocketFactory
The mail.debug log suggests that the pop3s implementation is ignoring this property and is using the default SSLSocketFactory:
pop3s DEBUG: Creating SSL socket using factory javax.net.ssl.SSLSocketFactory
I am appending my TestSSLSocketFactory source. It trivially wraps javax.net.ssl.SSLSocketFactory but writes a message to System.out when its getDefault() method is used.
-- 8< --
package test;
import java.io.IOException;
import java.net.InetAddress;
import java.net.Socket;
import java.net.UnknownHostException;
import javax.net.ssl.SSLSocketFactory;
public class TestSSLSocketFactory extends SSLSocketFactory {
SSLSocketFactory socketFactory = (SSLSocketFactory) SSLSocketFactory.getDefault();
public static SSLSocketFactory getDefault() {
System.out.println("TestSSLSocketFactory.getDefault()");
return new TestSSLSocketFactory();
}
@Override
public Socket createSocket(String host, int port) throws IOException, UnknownHostException {
return socketFactory.createSocket(host, port);
}
@Override
public Socket createSocket(InetAddress address, int port) throws IOException {
return socketFactory.createSocket(address, port);
}
@Override
public Socket createSocket(String host, int port, InetAddress localHost, int localPort) throws IOException, UnknownHostException {
return socketFactory.createSocket(host, port, localHost, localPort);
}
@Override
public Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort) throws IOException {
return socketFactory.createSocket(address, port, localAddress, localPort);
}
@Override
public Socket createSocket(Socket s, String host, int port, boolean autoClose) throws IOException {
return socketFactory.createSocket(s, host, port, autoClose);
}
@Override
public String[] getDefaultCipherSuites() {
return socketFactory.getDefaultCipherSuites();
}
@Override
public String[] getSupportedCipherSuites() {
return socketFactory.getSupportedCipherSuites();
}
}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (GERONIMO-4294) mail.pop3s.socketFactory.class is
ignored
Posted by "Rick McGuire (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-4294?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rick McGuire resolved GERONIMO-4294.
------------------------------------
Resolution: Fixed
Assignee: Rick McGuire
Committed revision 693807.
Thanks for providing the sample socket factory class. Made this a piece of cake to fix and verify.
> mail.pop3s.socketFactory.class is ignored
> -----------------------------------------
>
> Key: GERONIMO-4294
> URL: https://issues.apache.org/jira/browse/GERONIMO-4294
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: mail
> Environment: geronimo-javamail_1.4_mail-1.4.jar
> IBM JRE 6 SR 1
> Windows XP
> Reporter: Dave Rushall
> Assignee: Rick McGuire
>
> I am attempting to connect to a pop3s store using a custom SSLSocketFactory by setting the following in my session properties:
> mail.pop3s.socketFactory.class=test.TestSSLSocketFactory
> The mail.debug log suggests that the pop3s implementation is ignoring this property and is using the default SSLSocketFactory:
> pop3s DEBUG: Creating SSL socket using factory javax.net.ssl.SSLSocketFactory
> I am appending my TestSSLSocketFactory source. It trivially wraps javax.net.ssl.SSLSocketFactory but writes a message to System.out when its getDefault() method is used.
> -- 8< --
> package test;
> import java.io.IOException;
> import java.net.InetAddress;
> import java.net.Socket;
> import java.net.UnknownHostException;
> import javax.net.ssl.SSLSocketFactory;
> public class TestSSLSocketFactory extends SSLSocketFactory {
> SSLSocketFactory socketFactory = (SSLSocketFactory) SSLSocketFactory.getDefault();
> public static SSLSocketFactory getDefault() {
> System.out.println("TestSSLSocketFactory.getDefault()");
> return new TestSSLSocketFactory();
> }
> @Override
> public Socket createSocket(String host, int port) throws IOException, UnknownHostException {
> return socketFactory.createSocket(host, port);
> }
> @Override
> public Socket createSocket(InetAddress address, int port) throws IOException {
> return socketFactory.createSocket(address, port);
> }
> @Override
> public Socket createSocket(String host, int port, InetAddress localHost, int localPort) throws IOException, UnknownHostException {
> return socketFactory.createSocket(host, port, localHost, localPort);
> }
> @Override
> public Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort) throws IOException {
> return socketFactory.createSocket(address, port, localAddress, localPort);
> }
> @Override
> public Socket createSocket(Socket s, String host, int port, boolean autoClose) throws IOException {
> return socketFactory.createSocket(s, host, port, autoClose);
> }
> @Override
> public String[] getDefaultCipherSuites() {
> return socketFactory.getDefaultCipherSuites();
> }
> @Override
> public String[] getSupportedCipherSuites() {
> return socketFactory.getSupportedCipherSuites();
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.