【发布时间】:2019-09-24 05:10:06
【问题描述】:
我正在 Docker Alpine 映像中编写一个简单的网络爬虫。但是,我无法将 HTTPS 请求发送到仅支持 TLS1.0 的服务器。如何配置 Alpine linux 以允许过时的 TLS 版本?
我尝试将MinProtocol 添加到/etc/ssl/openssl.cnf,但没有成功。
示例 Dockerfile:
FROM node:12.0-alpine
RUN printf "[system_default_sect]\nMinProtocol = TLSv1.0\nCipherString = DEFAULT@SECLEVEL=1" >> /etc/ssl/openssl.cnf
CMD ["/usr/bin/wget", "https://www.restauracesalanda.cz/"]
当我构建并运行这个容器时,我得到了
Connecting to www.restauracesalanda.cz (93.185.102.124:443)
ssl_client: www.restauracesalanda.cz: handshake failed: error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol
wget: error getting response: Connection reset by peer
【问题讨论】:
标签: https openssl alpine tls1.0