Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
43
Help us understand the problem. What is going on with this article?
@moroi

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に出戻る方法が下記です。

使用されているSSLをみる

$ openssl version
LibreSSL 2.2.7

やっぱりOpenSSLじゃない。

HomebrewでOpenSSLをインストール

$ brew install openssl

インストールしたOpenSSLの詳細をみる。

$ brew info openssl
openssl: stable 1.0.2o (bottled) [keg-only]
SSL/TLS cryptography library
https://openssl.org/
/usr/local/Cellar/openssl/1.0.2o_1 (1,791 files, 12.3MB)
  Poured from bottle on 2018-05-08 at 15:22:23
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/openssl.rb
==> Dependencies
Build: makedepend ✘
==> Options
--without-test
    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
  /usr/local/etc/openssl/certs

and run
  /usr/local/opt/openssl/bin/c_rehash

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
43
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
moroi

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
43
Help us understand the problem. What is going on with this article?