简体   繁体   English

有没有办法使用带有自签名证书的无人机?

[英]Is there a way to use drone with self-signed certificates?

I'm trying to set up Drone using TLS but the drone agent can't connect to the server with the error: 我正在尝试使用TLS设置Drone,但是drone代理无法连接到服务器并出现以下错误:

connection failed, retry in 15s. websocket. Dial wss://drone-server:8000/ws/broker: x509: certificate signed by unknown authority

I've generated the necessary files and my docker-compose file for the drone server has DRONE_SERVER_CERT and DRONE_SERVER_KEY values set with the certificates, so I think the only problem is that it's self-signed. 我已经生成了必要的文件,并且用于无人机服务器的DRONE_SERVER_CERT -compose文件具有使用证书设置的DRONE_SERVER_CERTDRONE_SERVER_KEY值,因此我认为唯一的问题是它是自签名的。 But I'm not sure how to set up the certificates with the drone image to have it recognize the certificate's CA. 但是我不确定如何使用无人机图像设置证书以使其能够识别证书的CA。 Is there a way to set that up or am I going about this in completely the wrong way? 有没有办法进行设置,还是我完全以错误的方式进行此操作?

As far as I understand the drone CLI client, uses the systems' trusted certificate storage as most* applications do. 据我了解无人机CLI客户端,就像大多数*应用程序一样,使用系统的受信任证书存储。 So for your client to start trusting the server's self signed certificate, you should add the CA cert to your system storage. 因此,为使您的客户端开始信任服务器的自签名证书,应将CA证书添加到系统存储中。

A good guide on how to install a CA cert can be found in this answer . 此答案中可以找到有关如何安装CA证书的良好指南。

*browsers usually have their own CA cert DB *浏览器通常具有自己的CA证书数据库

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM