winja2008 发表于 2022-12-2 12:53

解决padavan x509: certificate signed by unknown authority问题

本帖最后由 winja2008 于 2022-12-2 13:07 编辑

今天安装alist添加阿里云盘一直报证书错误(Post "https://api.aliyundrive.com/v2/file/list": x509: certificate signed by unknown authority),可能我这个是精简版本的padavan,里面没有CA证书,好吧,自己把CA证书下载(https://secure.globalsign.net/cacert/Root-R1.crt)下来后还是报错,后来网上找到这篇文章顺利解决。
以下引用英文原文:
参考:https://github.com/“师夷长技以制夷”/“师夷长技以制夷”-plugin/issues/53
I think it's golang SSL certificate file seach path on Padawan problem, solved:

[*]install Entware;
[*]install ca-files;
opkg update
opkg upgrade
opkg install ca-bundle
opkg install ca-certificates
[*]export ca-path(These are default installed parh, you need find where pandawan install these file by youself then replace path... )
export SSL_CERT_FILE=/opt/etc/ssl/certs/ca-certificates.crt
export SSL_CERT_DIR=/opt/etc/ssl/certs



Or easy-way:
[*]Download https://curl.haxx.se/ca/cacert.pem to your router, like /opt/etc/cacert.pem;
[*]export SSL_CERT_FILE=/opt/etc/cacert.pem.
These will work too.And these will solve all x509: certificate signed by unknown authority problem on your Padawan when using any golang&TLS program.


ajiezn 发表于 2023-1-19 10:05

第二个方法命令多了个点,试了很久一直不行,后来去GitHub上找到原回答,命令是export SSL_CERT_FILE=/opt/etc/cacert.pem没有这个点点
页: [1]
查看完整版本: 解决padavan x509: certificate signed by unknown authority问题