aiven / aiven-client

aiven-client (avn) is the official command-line client for Aiven

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SSL error `SSLV3_ALERT_BAD_RECORD_MAC` on a fresh Mac install

kevinbowman-aiven opened this issue · comments

What happened?

After installing the avn CLI by running pip install aiven-client on a Mac (as per https://developer.aiven.io/docs/tools/cli.html), I get the following error when trying to run commands like avn project list or avn account list):

SSLError(SSLError(1, '[SSL: SSLV3_ALERT_BAD_RECORD_MAC] sslv3 alert bad record mac (_ssl.c:1125)'

What did you expect to happen?

I expected to see a list of my projects or accounts.

What else do we need to know?

This seems to be a problem related to the out-of-the-box SSL implementation on Macs (LibreSSL). I solved it locally by installing OpenSSL through homebrew and then using a homebrew version of python using the following steps:

  1. brew install openssl
  2. Make sure the $PATH contains the relevant parts from homebrew at the front (mine is now PATH=/opt/homebrew/opt/openssl@3/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin)
  3. brew reinstall python (which puts python3 and pip3 into /opt/homebrew/bin but doesn't replace the local python)
  4. pip3 install aiven-client

After those steps, I have /opt/homebrew/bin/avn available which works fine.