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握手。
任何線索我在這裏失蹤?