我有来自 Linux 服务器的根证书 pem 文件。需要连接到该服务器的应用程序告诉我它需要一个 publicCert pem 文件和一个 privateKey pem 文件才能与服务器通信。
我是否从根证书生成这些?我的想法是,我会向 openssl 提供根证书的路径,然后它会转储出我想要的 publicCert/privateKey。
我已经按照此处所述在服务器上创建了证书。现在我需要按照此处所述安装在下游设备上。
我需要使用的客户端连接的输入需要这些参数:
connString: 'HostName=foo'
protocol: MQTT
publicKeyCertificateString: certificateString or path to certificate
privateKeyString: keyString or path to key
new DeviceClient(connString, protocol, publicKeyCertificateString, privateKeyString);
- 证书格式:pem
- 认证格式:x509