Hi Steve,

My test works as well. My problem is that I am not able to get TLS working in a 
running server. AFAIK it the socket stuff is all meant to be working, all that is 
needed is to change the underlying security stuff.

To enable tls, leave requireSTARTTLS as false, and add the tls-enabled attribute (it 
is not there already), so that your jboss-service.xml entry looks something like:


                  requireSTARTTLSfalse 
                  requireClientCertfalse 
                  tls-enabledtrue 


 

I then build mail.ear and deploy in a running JBoss. 


Now when I try to connect using telnet (see previous example) it pukes out on the 
SSLSocketFactory.getDefault() line in CmdSTARTTLS. I think I lied a bit yesterday when 
I said it falls over on SSLSocketFactory.getDefault(), as the stack trace shows it to 
fall over on SSLSocketFactory.createSocket(). (Maybe it is throwing this error due to 
the telnet client not being SSL enabled, I need to read up a bit on SSL context :-) )

17:34:05,205 DEBUG [CmdSTARTTLS] STARTTLS command handler called 17:34:05,205 ERROR 
[STDERR] java.net.SocketException: Default SSL context init f 
ailed: null 
17:34:05,215 ERROR [STDERR] at 
javax.net.ssl.DefaultSSLSocketFactory.createSocket(DashoA6275) 
17:34:05,215 ERROR [STDERR] at 
org.jboss.mail.smtp.handlers.CmdSTARTTLS.handleRequest(CmdSTARTTLS.java:52) 
17:34:05,215 ERROR [STDERR] at 
org.jboss.mail.smtp.SMTPProtocolInstance.handleRequest(SMTPProtocolInstance.java:151) 
17:34:05,215 ERROR [STDERR] at org.jboss.mail.ServerThread.run(ServerThread.java:221) 
17:34:05,215 ERROR [STDERR] at java.lang.Thread.run(Thread.java:534) 
17:34:05,215 ERROR [SMTPProtocolInstance] Handle IO Error 17:34:05,215 ERROR [STDERR] 
java.lang.NullPointerException 
17:34:05,215 ERROR [STDERR] at org.jboss.mail.ServerThread.run(ServerThread.java:223) 
17:34:05,215 ERROR [STDERR] at java.lang.Thread.run(Thread.java:534) 
17:34:05,215 DEBUG [ServerThreadPool] freeing [EMAIL PROTECTED] 


When I connect using Thunderbird (set up to use TLS if available), I get a bit further 
but then it falls over when trying to call SSLSocketFactory.createSocket() - a 
different error this time:

14:28:50,293 ERROR [STDERR] java.net.SocketException: Export restriction: this JSSE 
implementation is non-pluggable.
14:28:50,293 ERROR [STDERR]     at 
javax.net.ssl.DefaultSSLSocketFactory.createSocket(DashoA6275)
14:28:50,293 ERROR [STDERR]     at 
org.jboss.mail.smtp.handlers.CmdSTARTTLS.handleRequest(CmdSTARTTLS.java:59)
14:28:50,303 ERROR [STDERR]     at 
org.jboss.mail.smtp.SMTPProtocolInstance.handleRequest(SMTPProtocolInstance.java:151)
14:28:50,303 ERROR [STDERR]     at 
org.jboss.mail.ServerThread.run(ServerThread.java:222)
14:28:50,303 ERROR [STDERR]     at java.lang.Thread.run(Thread.java:534)

(Note that the line numbers in my stack traces may be slightly of since I have been 
playing around)

I don't see why it works in one environment and not in the other, since the unit test 
is connecting via a socket as well?!? 

So I think it may have something to do with the fact that I am outside the US and have 
a JVM running a restricted version of JSSE (Java Secure Sockets Extension) :-(, but 
then why is the unit test working since it effectively does the same thing? 

It would be great to know if anybody with a US JVM is able to run this with TLS 
enabled using a client. Also, if anybody has any hints about how to get around the 
JSSE issue? 

Thanks,

Kab

<a 
href="http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3827723#3827723";>View 
the original post</a>

<a 
href="http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3827723>Reply 
to the post</a>


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to