Hi!

I just put together a really basic HTTP server on top of mina, and it works
great - http://localhost:1234 is serving up a really dumb static page. I'd
like to get SSL working, to test out https from the browser (we're building
a hardware device which will talk https to the server I'm implementing on
mina). So, grabbed the BogusSSLContextFactory and BogusTrustManagerFactory
(and the two factories) from the echoserver example. So in my code:

SSLFilter sslFilter = new
SSLFilter(BogusSSLContextFactory.getInstance(true));
chain.addLast("sslFilter", sslFilter);

Now, when I surf to the server (https://localhost:1234) and exception gets
thrown.

I'm probably missing something basic, as my networking chops are not great.

If anyone can help out, it would be appreciated.

Programming a simple HTTP server in mina was a breeze - very cool.

Cheers,

parki...


The stack trace is below:

ERROR 22:40:42:776 Exception thrown executing
'[EMAIL PROTECTED]'.
{engine.standard.StateRunnable.run}
  Trace java.lang.reflect.InvocationTargetException:
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:585)
>>> com.whatevernot.engine.standard.StateRunnable.run(StateRunnable.java:56)
   
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
   
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
    java.lang.Thread.run(Thread.java:613)
  Message: SSL handshake failed.
  Nested exception trace javax.net.ssl.SSLHandshakeException:
    org.apache.mina.filter.SSLFilter.messageReceived(SSLFilter.java:416)
   
org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:299)
   
org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:53)
   
org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:648)
   
org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:220)
   
org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(ExecutorFilter.java:264)
   
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
   
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
   
org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)
    java.lang.Thread.run(Thread.java:613)
  Message: no cipher suites in common
  Nested exception trace javax.net.ssl.SSLHandshakeException:
    com.sun.net.ssl.internal.ssl.Handshaker.checkThrown(Handshaker.java:994)
...
   
org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)
    java.lang.Thread.run(Thread.java:613)
  Message: no cipher suites in common
  Nested exception trace javax.net.ssl.SSLHandshakeException:
    com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:150)
   
com.sun.net.ssl.internal.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1356)
...
   
org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)
    java.lang.Thread.run(Thread.java:613)




-- 
View this message in context: 
http://www.nabble.com/Help-with-getting-https-running-tf4781472s16868.html#a13679052
Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.

Reply via email to