使用OpenSSL
生成的證書具有高於SSL
的RabbitMq
一個可行的解決方案後,我得到了來自我們的客戶的要求,我們不能使用OpenSSL
生成證書。服務器管理員通過IIS
創建了證書鏈。RabbitMQ的經紀人不接受PFX
我們做創建後下面的證書:
- 導出的服務器證書爲
PFX
和提取cert.pem和cert.key - 導出客戶端證書到
PFX
並提取出cert.pem和cert.key - 將根CA導出到rootca.pem
- 更新配置爲
RabbitMq
要測試的連接和證書文件被正確創建,我們通過Troubleshooting Steps here.
一切都過去了罰款。我們能夠在端口5671
使用openssl s_client
連接爲使用客戶端的cert.pem和cert.key從client.pfx所產生的預期。我們可以看到在管理控制檯中以及在日誌中進行的連接,並且它們來回傳遞。現在
,使用client.pfx在.NET客戶端,我們得到一個錯誤有關證書驗證:
MassTransit.RabbitMqTransport.RabbitMqConnectionException: Connect failed: [email protected]:5671/ ---> RabbitMQ.Client.Exceptions.BrokerUnreachableException: None of the specified endpoints were reachable ---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.
我如何會得到使用client.pfx錯誤但使用cert.pem和cert.key時,我從中提取的錯誤不會得到一個錯誤?