应用程序无法在 BeagleBone Black 运行 Debian 上验证 SSL 自签名证书
Application fails to verify SSL self-signed certificate on a BeagleBone Black running Debian
以下代码在我的 Ubuntu 机器(Python 2.7.6)中运行良好:
r = requests.get(GET_URL, verify=certificate_path)
当我在我的 BeagleboneBlack 中使用 Debian 运行 这段代码时,我得到了这个:
/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 具有自签名证书的路径。有人可以帮忙吗?
经过更多搜索并尝试了一些替代方案,包括评论中建议的替代方案,我发现了这个 link:
https://serverfault.com/questions/549679/issued-certificate-not-yet-valid-with-wget
问题是系统时钟设置为过去日期。
刚刚使用以下命令更正了日期,它对我有用:
$ ntpdate gps.ntp.br
以下代码在我的 Ubuntu 机器(Python 2.7.6)中运行良好:
r = requests.get(GET_URL, verify=certificate_path)
当我在我的 BeagleboneBlack 中使用 Debian 运行 这段代码时,我得到了这个:
/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 具有自签名证书的路径。有人可以帮忙吗?
经过更多搜索并尝试了一些替代方案,包括评论中建议的替代方案,我发现了这个 link: https://serverfault.com/questions/549679/issued-certificate-not-yet-valid-with-wget
问题是系统时钟设置为过去日期。
刚刚使用以下命令更正了日期,它对我有用:
$ ntpdate gps.ntp.br