# make sure openssl 1.1 is installed under /usr/local/Cellar, or install it:
brew install openssl@1.1
# remove openssl links under /usr/local/opt:
cd /usr/local/opt
rm openssl
rm openssl@3
# create a new link to openssl under /usr/local/opt:
ln -s /usr/local/Cellar/openssl@1.1/1.1.1l_1 /usr/local/opt/openssl