Mac OpenSSL upgrade to use TLS 1.3

Why

Mac OSX default OpenSSL is version 2 which not support TLS 1.3 by default. We have to force install OpenSSL version 3.

How

brew install [email protected]
brew link --force openssl

export PATH="/opt/homebrew/opt/[email protected]/bin:$PATH" >> ~/.zshrc

Validate TLS 1.3

openssl s_client -connect google.com:443 -tls1_3
openssl version -a

OpenSSL 3.0.5 5 Jul 2022 (Library: OpenSSL 3.0.5 5 Jul 2022)
built on: Tue Jul  5 08:57:04 2022 UTC
platform: darwin64-arm64-cc
options:  bn(64,64)
compiler: clang -fPIC -arch arm64 -O3 -Wall -DL_ENDIAN -DOPENSSL_PIC -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DNDEBUG
OPENSSLDIR: "/opt/homebrew/etc/[email protected]"
ENGINESDIR: "/opt/homebrew/Cellar/[email protected]/3.0.5/lib/engines-3"
MODULESDIR: "/opt/homebrew/Cellar/[email protected]/3.0.5/lib/ossl-modules"
Seeding source: os-specific
CPUINFO: OPENSSL_armcap=0x7f