Skip to content

SSL error SSLV3_ALERT_BAD_RECORD_MAC on a fresh Mac install #262

@kevinbowman-aiven

Description

@kevinbowman-aiven

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions