使用自定义CA调用API时超时 [英] Timeout when calling a API with custom CA
问题描述
嗨!
我正在尝试调用具有自签名证书的api https://fireflyproxy.radixtest.if.eu/
我收到消息了
I am trying to call an api that has a self signed certificate https://fireflyproxy.radixtest.if.eu/
I get the messages
哪个还可以(因为该证书不受信任)
但是当我使用
创建后端时
But when I to create an backend with
尝试在API管理实例中测试新方法时,我没有得到响应(我没有收到超时错误,也没有任何响应)
当我尝试在"CA证书"部分中上传我们的CA证书时,发生了同样的事情.
这真令人讨厌,因为我无法调用服务器.
具有受信任证书(以及相同的https/tls设置)的另一台服务器运行正常.
推荐答案
如果您使用的是自签名证书,则需要按顺序禁用证书链验证 API管理与后端系统进行通信.否则,它将返回500错误代码.要进行配置,您可以使用" New-AzureRmApiManagementBackend "(用于 新后端)或" Set-AzureRmApiManagementBackend "(对于现有后端)PowerShell cmdlet并设置"SkipCertificateChainValidation"参数 到真实".
If you are using self-signed certificates, you will need to disable certificate chain validation in order for API Management to communicate with the backend system. Otherwise it will return a 500 error code. To configure this, you can use the "New-AzureRmApiManagementBackend" (for new back end) or "Set-AzureRmApiManagementBackend" (for existing back end) PowerShell cmdlets and set the –"SkipCertificateChainValidation" parameter to "True".
context = New-AzureRmApiManagementContext-资源组'ContosoResourceGroup' -servicename'ContosoAPIMService' 新型RmApi管理后端 -Context
context = New-AzureRmApiManagementContext -resourcegroup 'ContosoResourceGroup' -servicename 'ContosoAPIMService' New-AzureRmApiManagementBackend -Context
上下文-Url 'https://contoso.com/myapi'-协议http -SkipCertificateChainValidation
context -Url 'https://contoso.com/myapi' -Protocol http -SkipCertificateChainValidation
这篇关于使用自定义CA调用API时超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!