alist icon indicating copy to clipboard operation
alist copied to clipboard

阿里云Open下api.nn.ci证书配置错误

Open 94Bo opened this issue 3 years ago • 9 comments

Please make sure of the following things

  • [X] I have read the documentation.
  • [X] I'm sure there are no duplicate issues or discussions.
  • [X] I'm sure it's due to alist and not something else(such as Dependencies or Operational).
  • [X] I'm sure I'm using the latest version

Alist Version / Alist 版本

v3.12.0

Driver used / 使用的存储驱动

Aliyundrive Open

Describe the bug / 问题描述

在debian11上安装的alist,添加阿里云Open时会出现

Post "https://api.nn.ci/alist/ali_open/token": x509: certificate signed by unknown authority

运行curl https://api.nn.ci会报60错误 unable to get local issuer certificate 而nn.ci与alist.nn.ci能成功ssl验证,三者都是let's encrypt签发证书 推测原因为api.nn.ci没有配置ca

临时解决办法

Oauth令牌链接使用http

解决办法

配置服务器,请使用fullchain.pem作为证书

Reproduction / 复现链接

<1> Debian 11下安装alist,添加任意token的aliyun open

<2> curl https://api.nn.ci

Logs / 日志

~ # curl -vv https://api.nn.ci

  • Trying 45.66.130.152:443...
  • Connected to api.nn.ci (45.66.130.152) port 443 (#0)
  • ALPN, offering h2
  • ALPN, offering http/1.1
  • successfully set certificate verify locations:
  • CAfile: /etc/ssl/certs/ca-certificates.crt
  • CApath: /etc/ssl/certs
  • TLSv1.3 (OUT), TLS handshake, Client hello (1):
  • TLSv1.3 (IN), TLS handshake, Server hello (2):
  • TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
  • TLSv1.3 (IN), TLS handshake, Certificate (11):
  • TLSv1.3 (OUT), TLS alert, unknown CA (560):
  • SSL certificate problem: unable to get local issuer certificate
  • Closing connection 0 curl: (60) SSL certificate problem: unable to get local issuer certificate More details here: https://curl.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.

94Bo avatar Feb 23 '23 19:02 94Bo

Thanks for opening your first issue here! Be sure to follow the issue template!

welcome[bot] avatar Feb 23 '23 19:02 welcome[bot]

确实, 作者api证书出问题了

qwertyuiop6 avatar Feb 24 '23 01:02 qwertyuiop6

可能是这个原因? https://letsencrypt.org/docs/dst-root-ca-x3-expiration-september-2021/

更新openssl和curl看看

jjm2473 avatar Feb 24 '23 03:02 jjm2473

建议看这个,有非常详细的描述 https://zhuanlan.zhihu.com/p/417627543

jjm2473 avatar Feb 24 '23 03:02 jjm2473

https://api.nn.ci/确实使用的是ISRG Root X1 CA证书,所以有可能是这个原因。

当然,还要检查下系统的时间是不是正确,时间不对也会导致SSL失败

jjm2473 avatar Feb 24 '23 03:02 jjm2473

忽略我说的,我在一些linux机器测试也发现了这个问题,但是测试 https://letsencrypt.org/ 却没有,应该是 https://api.nn.ci/ 独立的bug

jjm2473 avatar Feb 24 '23 04:02 jjm2473

已更换证书。

xhofe avatar Feb 24 '23 06:02 xhofe

填入了token,保存时:failed to refresh token: TooManyRequests 补充: 多刷几次,现在可以了,不知道回头会不会再次出现TooManyRequests

voncamel avatar Feb 24 '23 06:02 voncamel

已解决: 更改oauth令牌地址: https://api-cf.nn.ci/alist/ali open/token,完美解决

heli9913 avatar Jun 14 '23 04:06 heli9913