0
我在我的一個應用程序中使用彈簧集成與銀行進行通信。在重載時,我們收到錯誤「org.springframework.messaging.MessagingException:SSL握手花費的時間過長」。銀行要求我們將超時設置爲90秒。 查看TcpNioSSLConnection類的代碼時,我發現30秒是硬編碼的。在彈簧集成中沒有選項定義SSL握手超時
private HandshakeStatus waitForHandshakeData(SSLEngineResult result,
HandshakeStatus status) thr`enter code here`ows IOException {
try {
if (logger.isTraceEnabled()) {
logger.trace("Writer waiting for handshake");
}
if (!TcpNioSSLConnection.this.semaphore.tryAcquire(30, TimeUnit.SECONDS)) {
throw new MessagingException("SSL Handshaking taking too long");
}
if (logger.isTraceEnabled()) {
logger.trace("Writer resuming handshake");
}
status = runTasksIfNeeded(result);
}
catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new MessagingException("Interrupted during SSL Handshaking");
}
return status;
}
請給我建議,如果有任何的方式來提高SSL握手超時
下面是我的春天一體化連接工廠配置
<int-ip:tcp-connection-factory id="client"
type="client" port="${cbs.third.party.port}" host="${cbs.third.party.host}"
single-use="true" using-nio="true" deserializer="javaDeserializer"
serializer="javaSerializer" ssl-context-support="sslContextSupport" task-executor="myTaskExecutor"/>
感謝, 羅希特
謝謝你的回覆加里。我會檢查一下 –
謝謝加里, –