[ 
https://issues.apache.org/jira/browse/DIRMINA-1005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14304870#comment-14304870
 ] 

zphreg commented on DIRMINA-1005:
---------------------------------

I tested on both 2.0.7 and 2.0.9 version.

I debugged the source codes, and the handshakeStatus stopped at NEED_TASK.
So, I appended handshakeComplete = true; after doTask().
The bug was fixed.

> SSL write blocked on Android
> ----------------------------
>
>                 Key: DIRMINA-1005
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-1005
>             Project: MINA
>          Issue Type: Bug
>          Components: SSL
>    Affects Versions: 2.0.7
>         Environment: Android
>            Reporter: zphreg
>
> I'm developing an Android app using Apache Mina for network IO. Non-SSL 
> connections (reading, writing) work fine, but as soon as I add an SSL filter 
> things stop working. I also tried pure SSL sockets and they work fine.
> final byte[] TEST_TEXT = new byte[]{
>         'a', '\n'
> };
> ......
> connectorTLSFilter = new SslFilter(BogusSslContextFactory
>                         .getInstance(false));
> connectorTLSFilter.setUseClientMode(true);
> connector.getFilterChain().addFirst("SSL", connectorTLSFilter);
> connector.setHandler(new MinaClientHandler());
> ConnectFuture future = connector.connect(new 
> InetSocketAddress("192.168.0.10", 443));
> future.awaitUninterruptibly();
> Log.v("ssl", "handshake sucess");
> IoSession session = future.getSession();
> IoBuffer buf = IoBuffer.allocate(TEST_TEXT.length);
> buf.put(TEST_TEXT);
> buf.flip();
> Log.v("ssl","sending");
> session.write(buf).awaitUninterruptibly();
> Log.v("ssl","sent");
> =============================
> Blocked at "sending"



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to