1
我正在使用Apache Mina(Mina2 - Netty不可用 - 不要问为什么:P)创建一个通过TLS连接到TCP服务器的TCP客户端。Apache Mina TLS客户端 - 骆驼
这里的的SSLContext:
这里是我的蓝图XML路线:
<route id="ReadMQ">
<from uri="jmsep://topic:test/014/data" />
<process ref="readIt"></process>
<to
uri="mina2:tcp://SOMEHOST:38332?sync=true;sslContextParameters=#mySSL;minaLogger=true" />
</route>
cert.pem同时包含密钥和证书在里面。
当妮娜尝试连接到端点,因此它的服务器关闭与此错误的连接:
System.IO.IOException: The handshake failed due to an unexpected packet format.
at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
望着错误,那感觉就像米娜没有用正确的协议连接?
这里的米娜说什么:
SEVERE: Exception on receiving message from address: SOMEHOST:38332 using connector: (nio socket connector: managedSessionCount: 0)
Throwable occurred: java.io.IOException: An existing connection was forcibly closed by the remote host.
此外,当我使用的s_client.First这样: 的OpenSSL的s_client.First -connect,某:38332 -cert cert.pem - 键cert.pem -state -debug
它开始并通过交换证书进行SSL握手。
任何线索我在这里失踪?