メンテナンス・トラブルシュート - - SSL - openssl か openssl-devel か - openssl-devel へ

 クラウディア
1. 概要
2. opnssel から openssl-devel へ
3. インストール時のメッセージ
4. これからの問題

1. 概要

 「ウェブサーバの TLS ChaCha20-Poly1305 で通信させたい」という記事に耳寄りな情報が!  本記事によれば「X25519 を使用するには OpenSSL 1.1.0 以上が必要だが FreeBSD の ports で OpenSSL(security/openssl) をインストールしている場合は 1.0.x の筈なので非対応。security/openssl-dev に変えなければならない。つい2ヶ月ほど前までは security/openssl-dev をインストールしようとすると多くの関連 ports がビルドエラーになっていたが、急速に対応状況が改善していて2018年6月11日時点では OpenSSL に依存している ports の殆どが security/openssl-dev 対応になっている。一部非対応 ports も残っているので油断はできないが。」とのことで。(赤字 引用者)  まずそうなとこは見ないふりをして。やっちゃおう。

2. opnssel から openssl-devel へ

 まずは

/etc/make.conf
 の書き換え(これも何度もつけたりはずしたりしていたのですが)

DEFAULT_VERSIONS+=ssl=openssl-devel
 の行を追加します。  ports を openssl から openssl-devel へ(これはどちらか反応する方だけでいいらしいです)

portupgrade -o security/openssl-devel security/openssl
portupgrade -f -o security/openssl-devel security/openssl
 で、依存するものをアップグレード

portupgrade -fr security/openssl-devel
 参考サイトの言うように、いささか時間はかかります。

3. インストール時のメッセージ

 インストール時のメッセージを記録しておきます。

===>  Installing for openssl-devel-1.1.0h_2
===>  Checking if openssl-devel already installed
===>   Registering installation for openssl-devel-1.1.0h_2
Installing openssl-devel-1.1.0h_2...
===> SECURITY REPORT:
      This port has installed the following files which may act as network
      servers and may therefore pose a remote security risk to the system.
/usr/local/lib/libcrypto.a(bss_dgram.o)
/usr/local/lib/libcrypto.a(b_sock2.o)
/usr/local/lib/libcrypto.so.10

      If there are vulnerabilities in these programs there may be a security
      risk to the system. FreeBSD makes no guarantee about the security of
      ports included in the Ports Collection. Please type 'make deinstall'
      to deinstall the port if this is a concern.

      For more information, and contact details about the security
      status of this software, see the following webpage:
http://www.openssl.org/

4. これからの問題

 これでまぁ、openssl-devel でいく覚悟はできたのですが。  臭いものに蓋をしてもやはりだめですね。  参考サイトの「一部非対応 ports も残っているので油断はできないが」ってやつでして。  2018年6月19日時点で

> pkg version -vl "<"
php56-openssl-5.6.35_1             <   needs updating (index has 5.6.36_1)
 が

> portupgrade -Rr php56-openssl
[Reading data from pkg(8) ... - 396 packages found - done]
** Port marked as IGNORE: security/php56-openssl:
        is marked as broken: Does not build with openssl-devel
[Gathering depends for lang/php56-extensions .................................
............................................................ done]
[Exclude up-to-date packages ...............** Port marked as IGNORE: security/php56-openssl:
        is marked as broken: Does not build with openssl-devel
............................................................ done]
** Listing the failed packages (-:ignored / *:skipped / !:failed)
        - security/php56-openssl (marked as IGNORE)
        - security/php56-openssl (marked as IGNORE)
 てなことになってます。  次ページ以降に、openssl-devel 未対応のためアップグレードできない ports を掲載していきます。