如何从iot.eclipse.org服务器获取SSL / TLS证书链

时间:2018-08-29 11:07:46

标签: ubuntu openssl ssl-certificate

大家好,我正在使用ssl / tls处理mqtt,我需要获取证书链,我使用openssl获得了两个证书,并将其保存在ssl / cert文件夹中的DST_Root_ca_x3.pem证书文件中。但是它看起来像快捷方式文件,我无法进行哈希处理,并且我不知道我的证书正在与服务器一起验证,并且我想使用python来实现,因为我使用的是pi,所以我遵循以下链接:how to use ssl/tls in paho mqtt using python i got certificate verify failed 以及此链接:mosquitto_pub rejecting iot.eclipse.org mqtt server certificate saying "Unknown CA"

我的第一个错误

SELECT 
DISTINCT p.product_id,
p.product_name 
FROM products AS p
LEFT JOIN product_category AS pc ON p.product_id = pc.product_id
LEFT JOIN vendor_products AS vp ON p.product_id = vp.product_id
LEFT JOIN subcategories AS sc ON sc.subcategory_id = pc.subcategory_id
LEFT JOIN subcategories_value AS scv ON scv.subcategory_value_id = pc.subcategory_value_id
WHERE vp.vendor_id = 2 
    AND vp.category_id = 2 
    AND pc.subcategory_id IN (1, 2) 
    AND scv.subcategory_value_id IN (1, 4)
ORDER BY p.product_id;

我的第二个错误

vec123@vec123-VirtualBox:~$ pwd
/home/vec123
vec123@vec123-VirtualBox:~$ dir
certs    Documents  dstrootcax3.p7c   Music Public     Videos
Desktop  Downloads  examples.desktop  Pictures  Templates
vec123@vec123-VirtualBox:~$ cd certs
vec123@vec123-VirtualBox:~/certs$ ls
DST_Root_CA_X3.pem  io.cert1.pem  io.cert.pem  
vec123@vec123-VirtualBox:~/certs$ mosquitto_pub -h iot.eclipse.org -p 8883 --capath /home/vec123/certs/ -t house/s1 -m "test message" -d
Client mosqpub|3311-vec123-Vir sending CONNECT  
Error: A TLS error occurred.
ec123@vec123-VirtualBox:~/certs$ 

0 个答案:

没有答案