应用程序无法在运行Debian的BeagleBone Black上验证SSL自签名证书

时间:2017-01-13 18:14:40

标签: python debian ssl-certificate beagleboneblack self-signed

以下代码在我的Ubuntu机器(Python 2.7.6)中正常工作:

r = requests.get(GET_URL, verify=certificate_path)

当我使用Debian在BeagleboneBlack中运行此代码时,我得到了这个:

/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:100:
InsecurePlatformWarning: A true SSLContext object is not available. This prevents 
urllib3 from configuring SSL appropriately and may cause certain SSL connections 
to fail.

For more information, see https://urllib3.readthedocs.org/en/latest/security.html
#insecureplatformwarning.   InsecurePlatformWarning

[Errno 1] _ssl.c:504: 
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

certificate_path具有自签名证书的路径。有人可以帮忙吗?

1 个答案:

答案 0 :(得分:0)

在搜索了更多并尝试了一些替代方案,包括评论中的建议方法后,我发现了这个链接: https://serverfault.com/questions/549679/issued-certificate-not-yet-valid-with-wget

问题是系统时钟设置为过去的日期

刚刚使用以下命令更正了日期,它对我有用:

$ ntpdate gps.ntp.br