axel-download-accelerator / axel

Lightweight CLI download accelerator
GNU General Public License v2.0
3.02k stars 267 forks source link

SSL error: unregistered scheme, macOS 13.2.1 + axel 2.17.11 #403

Closed luckman212 closed 1 year ago

luckman212 commented 1 year ago

Since a few days ago, I am getting SSL errors from some sites. curl is not complaining. Here's one example:

$ axel -o /tmp/test https://dist.mountainduck.io/Mountain%20Duck-4.13.5.20986.zip
Initializing download: https://dist.mountainduck.io/Mountain%20Duck-4.13.5.20986.zip
SSL error: unregistered scheme
(null)

$ axel -V
Axel 2.17.11 (darwin22.1.0)

$ sw_vers
ProductName:        macOS
ProductVersion:     13.2.1
BuildVersion:       22D68

$ curl -Lo /tmp/test https://dist.mountainduck.io/Mountain%20Duck-4.13.5.20986.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   399  100   399    0     0    930      0 --:--:-- --:--:-- --:--:--   941
100  154M  100  154M    0     0  71.2M      0  0:00:02  0:00:02 --:--:-- 91.6M

Let me know if you want any other debug info!

ismaell commented 1 year ago

I'm not seeing that error on Linux, which TLS library is it linked to and which version is it? OpenSSL 3.x maybe?

luckman212 commented 1 year ago

Hmm. Good hint! I didn't know it was using openssl3... I did have that installed, but something must have been missing or corrupt.

$ brew info axel
==> axel: stable 2.17.11 (bottled), HEAD
Light UNIX download accelerator
https://github.com/axel-download-accelerator/axel
/opt/homebrew/Cellar/axel/2.17.11 (8 files, 166.0KB) *
  Poured from bottle using the formulae.brew.sh API on 2023-02-17 at 14:12:11
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/axel.rb
License: GPL-2.0-or-later with openvpn-openssl-exception
==> Dependencies
Build: pkg-config ✔
Required: gettext ✔, openssl@3 ✔
                         \
                          \______________ ok

$ brew info openssl@3
==> openssl@3: stable 3.0.8 (bottled) [keg-only]
Cryptography and SSL/TLS Toolkit
https://openssl.org/
/opt/homebrew/Cellar/openssl@3/3.0.8 (6,480 files, 28.1MB)
  Poured from bottle on 2023-02-08 at 07:16:43
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/openssl@3.rb
License: Apache-2.0
==> Dependencies
Required: ca-certificates ✔
                 \
                  \___________ ah...

I ran the following to reinstall everything and, all good now. 🚀

brew reinstall ca-certificates openssl@3 axel

Maybe it helps someone... 👍

ismaell commented 1 year ago

Most SSL error messages come directly from the TLS API, when callling SSL_connect, they're not very intuitive...

luckman212 commented 1 year ago

This error came back after I updated to macOS Sonoma. I had forgotten about this issue and was about to open a new one but luckily decided to search first!

The same command worked again, and fixed the problem

brew reinstall ca-certificates openssl@3 axel