Posted at

macOS High Sierra(OSX)のOpenSSLをデフォルトのLibreSSLからOpenSSLに変更する

More than 1 year has passed since last update.

MacのHigh Sierraから、デフォルトのOpenSSLがOpenSSLからLibreSSLになっているそうで、OpenSSLの諸々の問題を鑑みれば英断らしいのですが、そうはいっても開発環境の様々なツールがOpenSSLに依存しておりアレコレと新たな問題を引き起こすため、様々なツールのほうがLibreSSLに対応するまでさくっとOpenSSLに出戻る方法が下記です。


$ openssl version

LibreSSL 2.2.7



$ brew install openssl


$ brew info openssl

openssl: stable 1.0.2o (bottled) [keg-only]
SSL/TLS cryptography library
/usr/local/Cellar/openssl/1.0.2o_1 (1,791 files, 12.3MB)
Poured from bottle on 2018-05-08 at 15:22:23
==> Dependencies
Build: makedepend ✘
==> Options
Skip build-time tests (not recommended)
==> Caveats
A CA file has been bootstrapped using certificates from the SystemRoots
keychain. To add additional certificates (e.g. the certificates added in
the System keychain), place .pem files in

and run

This formula is keg-only, which means it was not symlinked into /usr/local,
because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries.

If you need to have this software first in your PATH run:
echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile

For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/openssl/lib
CPPFLAGS: -I/usr/local/opt/openssl/include

If you need to have this software first in your PATH run:



$ echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile


$ openssl version

OpenSSL 1.0.2o 27 Mar 2018