我有一个使用QuickFIX/J编写的应用程序来连接彭博服务器。最近彭博社为他们的服务器添加了CA证书验证,并且他们为握手提供了额外的CA证书文件。QuickFIX/J CA证书验证
我的应用程序使用SSL连接,当从彭博方面禁用CA证书验证时,应用程序成功连接到服务器并获取消息。启用CA验证时握手失败。
下面是我试过的步骤。
- 以前我使用
ImportKey
Java类来添加证书和密钥。 我将其更改为添加多个证书。如果需要,我可以发布 Java类。 - 当我使用openssl s_client连接到服务器时,它成功连接到服务器。
是否有任何需要在应用程序级别上进行更改?组态?或者在Java密钥库级别有什么要做的?当连接如下加入
错误消息来了:
20160823-06:04:15,FIX.4.4:XXXX-> XXXX,误差>(断开:插座 异常(/XXXX.XXXX。 XXX.XX:20237): javax.net.ssl.SSLHandshakeException:SSL握手失败) 成功退出为的sessionId:FIX.4.4:XXXX-> XXXX
任何帮助表示赞赏!
配置:
[default]
# Settings which apply to all the Sessions.
ConnectionType=initiator
LogonTimeout=86400
ResetOnLogon=Y
UseDataDictionary=Y
MaxLatency=240
#StartTime=00:00:00
#EndTime=00:00:00
#StartTime=02:30:00
#EndTime=12:30:00
StartTime=02:21:00
EndTime=12:21:00
HeartBtInt=30
ReconnectInterval=5
[session]
# Settings specifically for one session
BeginString=FIX.4.4
SocketConnectHost=xxx.xxx.xxx.xxx
SocketUseSSL=Y
SocketKeyStorePassword=importkey
CheckLatency=N
#SendResetSeqNumFlag=Y
# new setups
FileLogHeartbeats=Y
##----- CAPS Configuration ---------##
FileStorePath=/etc/bloomburg-live/msgs
FileLogPath=/etc/bloomburg-live/logs
DataDictionary=/etc/bloomburg-live/conf/FIX44.xml
SocketKeyStore=/root/.keystore
TargetCompID=BLPSTP
SocketConnectPort=xxxxx
SenderCompID=CAPSTP
# log configuration
FileIncludeMilliseconds=Y
FileIncludeTimeStampForMessages=Y
ScreenLogShowHeartBeats=Y
#Filter heartbeats from output (both incoming and outgoing)
PS - 无CA证书验证的应用工作。启用CA证书验证时出现错误。
Downvote?这是为什么? – ambarox
也许你应该显示处理证书的代码片段。 –
没有代码片段只有配置。并且没有配置来处理ca证书。 – ambarox