Delphi XE2 DataSnap Server - HTTPS'无法加载证书' [英] Delphi XE2 DataSnap Server - HTTPS 'Could not load certificate'
问题描述
我有一个现有的DataSnap服务器(Windows服务)在HTTP上正常运行,我现在想要添加HTTPS作为附加协议。我已经获得并安装了SSL证书并生成了证书文件(.crt)和私钥文件(.key)。作为测试,当使用Delphi XE2 DataSnap Server向导并勾选HTTPS来获取证书页面时,我可以引用这2个文件并单击Test按钮,该按钮成功。我添加了一个额外的TDSHTTPService组件并将其链接到TDSCertFiles组件。在我的服务启动事件中,我在启动DSServer之前,在DSCertFiles.CertFile和DSCertFiles.KeyFile属性中设置了2个证书文件的路径。尝试启动该服务时,我收到错误:
I have an existing DataSnap server (Windows service) which is running fine on HTTP, and I now want to add HTTPS as an additional protocol. I've obtained and installed an SSL certificate and generated a certificate file (.crt) and private key file (.key). As a test, when using the Delphi XE2 DataSnap Server wizard and ticking 'HTTPS' to get the certificate page, I can reference the 2 files and click the 'Test' button which succeeds. I've added an additional TDSHTTPService component and linked it to a TDSCertFiles component. In my service startup event I'm setting the path to the 2 certificate files before starting the DSServer, in the DSCertFiles.CertFile and DSCertFiles.KeyFile properties. When trying to start the service I get the error :
无法加载证书。错误:140AD002:SSL
例程:SSL_CTX_use_certificate_file:system lib
Could not load certificate. error:140AD002:SSL routines:SSL_CTX_use_certificate_file:system lib
我有什么遗漏?
推荐答案
错误代码 0x140AD002
表示 SSL_CTX_use_certificate_file()
无法打开文件。
Error code 0x140AD002
means SSL_CTX_use_certificate_file()
was not able to open the file.
这篇关于Delphi XE2 DataSnap Server - HTTPS'无法加载证书'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!