Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Curl v8 breaks wget on MacOS #3048

Open
Haroon-Khel opened this issue May 5, 2023 · 0 comments
Open

Curl v8 breaks wget on MacOS #3048

Haroon-Khel opened this issue May 5, 2023 · 0 comments

Comments

@Haroon-Khel
Copy link
Contributor

Haroon-Khel commented May 5, 2023

Currently in our playbooks we install the latest Curl onto a machine if it is detected that its current version is less than 7.58.0.

test-macstadium-macos1014-x64-1 and -3 are two such machines, they now have the latest curl

test-macstadium-macos1014-x64-1:~ administrator$ curl --version
curl 8.0.1 (x86_64-apple-darwin18.7.0) libcurl/8.0.1 (SecureTransport) OpenSSL/1.1.1t zlib/1.2.11 brotli/1.0.9 zstd/1.5.5 libidn2/2.3.4 libssh2/1.10.0 nghttp2/1.52.0 librtmp/2.3
Release-Date: 2023-03-20
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz MultiSSL NTLM NTLM_WB SPNEGO SSL threadsafe TLS-SRP UnixSockets zstd

Initially this broke wget

test-macstadium-macos1014-x64-1:~ administrator$ wget 'https://api.adoptium.net/v3/binary/latest/8/ga/mac/x64/jdk/hotspot/normal/eclipse?project=jdk'
dyld: Library not loaded: /usr/local/opt/libunistring/lib/libunistring.2.dylib
  Referenced from: /usr/local/bin/wget
  Reason: image not found
Abort trap: 6

I reinstalled wget via brew, which installed it with Openssl3

...
perl ./Configure --prefix=/usr/local/Cellar/openssl@3/3.1.0 --openssldir=/usr/local/etc/openssl@3 --libdir=/usr/local/Cellar/openssl@3/3.1.0/lib no-ssl3 no-ssl3-method no-zlib darwin64-x86_64-cc enable-ec_ni
==> make

==> make install MANDIR=/usr/local/Cellar/openssl@3/3.1.0/share/man MANSUFFIX=ssl
==> make test

🍺  /usr/local/Cellar/openssl@3/3.1.0: 6,487 files, 29.9MB, built in 11 minutes 55 seconds
==> Installing wget
==> ./configure --prefix=/usr/local/Cellar/wget/1.21.3_1 --sysconfdir=/usr/local/etc --with-ssl=openssl --with-libssl-prefix=/usr/local/opt/openssl@3 --disable-pcre --disable-pcre2 --without-libpsl --without-inc
==> make install
...

and now wget works fine. However, the get_url ansible module now fails to download jdks

TASK [adoptopenjdk_install : Download latest JDK 18 release (macOS)] ***********
FAILED - RETRYING: Download latest JDK 18 release (macOS) (3 retries left).
FAILED - RETRYING: Download latest JDK 18 release (macOS) (2 retries left).
FAILED - RETRYING: Download latest JDK 18 release (macOS) (1 retries left).
fatal: [test-macstadium-macos1014-x64-1]: FAILED! => {"attempts": 3, "changed": false, "dest": "/tmp/18-installer.pkg", "elapsed": 0, "msg": "Request failed: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)>", "url": "https://api.adoptium.net/v3/installer/latest/18/ga/mac/x64/jdk/hotspot/normal/eclipse?project=jdk"}

(failed this way before and after reinstalling wget, but not before curl was updated to 8)

I think it has to do with the version of openssl ansible is using for its get_url module

(default openssl before openssl3 through brew was installed and I symlinked it to /usr/local/bin/openssl)
test-macstadium-macos1014-x64-1:~ administrator$ /usr/bin/openssl version
LibreSSL 2.6.5

test-macstadium-macos1014-x64-1:~ administrator$ /usr/local/bin/openssl version
OpenSSL 3.1.0 14 Mar 2023 (Library: OpenSSL 3.1.0 14 Mar 2023)
test-macstadium-macos1014-x64-1:~ administrator$ /usr/bin/openssl s_client -connect api.adoptium.net:443
...

    Start Time: 1683306301
    Timeout   : 7200 (sec)
    Verify return code: 10 (certificate has expired)
est-macstadium-macos1014-x64-1:~ administrator$ /usr/local/bin/openssl s_client -connect api.adoptium.net:443
...
SSL handshake has read 4704 bytes and written 444 bytes
Verification: OK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

1 participant