Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/delphi/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ssl/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Delphi 如何在sgcWebSockets 3.2中配置SSL?_Delphi_Ssl_Ssl Certificate_Sgc Websockets - Fatal编程技术网

Delphi 如何在sgcWebSockets 3.2中配置SSL?

Delphi 如何在sgcWebSockets 3.2中配置SSL?,delphi,ssl,ssl-certificate,sgc-websockets,Delphi,Ssl,Ssl Certificate,Sgc Websockets,我买了一个SSL证书,所有的都是一个.crt文件 我需要在Delphi上正确配置https服务器。我使用一个名为sgcWebSockets 3.2的模块。正如我在手册中看到的,我需要设置以下参数: 1) SSLOptions/CertFile/KeyFile/RootCertFile: 需要.PEM格式的证书才能加密 websocket通信 2) s选项/密码:这是可选的,仅限 如果证书有密码,则需要 3) SSLOptions/Port:用于SSL连接的端口 但我只有一个.crt文件。我想我可

我买了一个SSL证书,所有的都是一个.crt文件

我需要在Delphi上正确配置https服务器。我使用一个名为sgcWebSockets 3.2的模块。正如我在手册中看到的,我需要设置以下参数:

1) SSLOptions/CertFile/KeyFile/RootCertFile: 需要.PEM格式的证书才能加密 websocket通信

2) s选项/密码:这是可选的,仅限 如果证书有密码,则需要

3) SSLOptions/Port:用于SSL连接的端口


但我只有一个.crt文件。我想我可以使用openssl将其转换为.pem格式。但是这个文件是什么?这是CertFile还是RootCertFile?反正我没有密钥文件。它是否只适用于一个证书文件?我也没有密码。我应该把这个字段留空吗?请提供帮助。

您可以使用OpenSSL将crt文件转换为pem文件,如下所示:

 openssl x509 -inform der -in certificate.crt -out certificate.pem.

但这不是你需要的唯一文件。您还需要您的私钥,该私钥用于生成您发送给证书颁发机构的csr,并且必须采用pem格式。我不确定您是如何生成csr的,因此我需要更多信息来帮助您提取csr或将其转换为pem格式。

I使用同样提供TLS的反向代理服务器是否更容易-Delphi中不再需要SSL/TLS配置,您还有许多其他好处我将联系证书供应商客户支持