プロジェクト

全般

プロフィール

バグ #1585

完了

OpenSSL 3.x 環境 (ubuntu 22.04 等) で mikutter が起動しない

Izumi Tsutsui さんがほぼ2年前に追加. 17日前に更新.

ステータス:
終了
優先度:
通常
担当者:
対象バージョン:
プラグイン名:
world
ブランチ:
クラッシュする:
はい

説明

概要

ubuntu 22.04 LTS で mikutter 5.0.4 が起動しない。
OpenSSL 3.x で deprecated とされた blowfish が使われていることが原因と思われる。

現象

bundler を設定して mikutter を起動すると以下の "unsupported" の OpenSSL のエラーが出力されて起動に失敗する。

notice: {MIKUTTER_DIR}/core/miquire_plugin.rb:154:in `block in load': plugin loaded: {MIKUTTER_DIR}/plugin/world/world.rb
/home/tsutsui/mikutter/plugin/world/keep.rb:131:in `initialize': unsupported (OpenSSL::Cipher::CipherError)
    from /home/tsutsui/mikutter/plugin/world/keep.rb:131:in `new'
    from /home/tsutsui/mikutter/plugin/world/keep.rb:131:in `decrypt'
    from /home/tsutsui/mikutter/plugin/world/keep.rb:37:in `block in accounts'
    from /home/tsutsui/mikutter/plugin/world/keep.rb:34:in `synchronize'
    from /home/tsutsui/mikutter/plugin/world/keep.rb:34:in `accounts'
    from /home/tsutsui/mikutter/plugin/world/world.rb:39:in `load_world'
    from /home/tsutsui/mikutter/plugin/world/world.rb:80:in `block (3 levels) in <top (required)>'

原因

world plugin の decrypt で使用している encrypt(), decrypt() で使用している blowfish の bf-ecb
OpenSSL 3.x で deprecated とされていて(少なくともデフォルトの状態では)使えなくなっていることが原因と思われる。
source:plugin/world/keep.rb@a94158ee#L131

参考:
https://www.openssl.org/docs/manmaster/man7/migration_guide.html#Deprecated-low-level-encryption-functions
https://wiki.openssl.org/index.php/OpenSSL_3.0#Providers

対応案

暗号化というか情報秘匿ではなく難読化が目的であれば、暗号アルゴリズムを使う必然性は薄くて
base64 とかでも同じという気はする。(key も乱数生成で config に保管しているようなので)

ただ、変更すると migration 処理の実装が必要になってそれはそれで大変?


ファイル

0001-added-OpenSSL-ver3.patch (5.27 KB) 0001-added-OpenSSL-ver3.patch git format-patch developで生成したpatch ncaq エヌユル, 2022-05-25 19:40
0001-added-OpenSSL-ver3.patch (5.28 KB) 0001-added-OpenSSL-ver3.patch ncaq エヌユル, 2022-05-25 21:30
osc-mikutter-compatibility.png (52.9 KB) osc-mikutter-compatibility.png Izumi Tsutsui, 2022-07-17 02:14
openssl.cnf.diff (662 Bytes) openssl.cnf.diff Izumi Tsutsui, 2022-12-07 01:02
1585-use-own-blowfish-impl.patch (40.7 KB) 1585-use-own-blowfish-impl.patch Osamu Koga, 2023-10-05 20:56
0001-README-blowfish-OpenSSL.patch (1.79 KB) 0001-README-blowfish-OpenSSL.patch Izumi Tsutsui, 2023-11-25 15:37

再現手順

  1. ubuntu 22.04 をインストールする
  2. ログインして端末を起動する
  3. 以下を実行して mikutter を入れて起動
    sudo apt install make gcc git ruby bundler libcairo-dev
    git clone git://mikutter.hachune.net/mikutter.git
    cd mikutter
    bundle config set --local path vendor/bundle
    bundle install
    ruby mikutter.rb
    

他の形式にエクスポート: Atom PDF