httpsopensslalpine-linuxtls1.0

Send an HTTPS request to TLS1.0-only server in Alpine linux


I'm writing a simple web crawler inside Docker Alpine image. However I cannot send HTTPS requests to servers that support only TLS1.0 . How can I configure Alpine linux to allow obsolete TLS versions?

I tried adding MinProtocol to /etc/ssl/openssl.cnf with no luck.

Example 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/"]

When I build and run this container, I get

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

Solution

  • I can reproduce your issue using the builtin-busybox-wget. However, using the "regular" wget works:

    root@a:~# docker run --rm -it node:12.0-alpine /bin/ash
    / # wget -q https://www.restauracesalanda.cz/; echo $?
    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
    1
    / # apk add wget
    fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/main/x86_64/APKINDEX.tar.gz
    fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/community/x86_64/APKINDEX.tar.gz
    (1/1) Installing wget (1.20.3-r0)
    Executing busybox-1.29.3-r10.trigger
    OK: 7 MiB in 17 packages
    / # wget -q https://www.restauracesalanda.cz/; echo $?
    0
    / #
    

    I'm not sure, but maybe you should post an issue at https://bugs.alpinelinux.org