zphreg created DIRMINA-1004:
-------------------------------

             Summary: SSL write blocked on Android
                 Key: DIRMINA-1004
                 URL: https://issues.apache.org/jira/browse/DIRMINA-1004
             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