From: k@... Date: 2017-11-10T04:05:28+00:00 Subject: [ruby-dev:50314] [Ruby trunk Bug#4418][Rejected] OpenSSL::PKey::DH#public_key Issue #4418 has been updated by rhenium (Kazuki Yamaguchi). Status changed from Assigned to Rejected I agree the name 'public_key' was not a good choice, but at the same time I don't think the name being confusing is not strong enough justification to remove or rename now. I'll leave it as is. ---------------------------------------- Bug #4418: OpenSSL::PKey::DH#public_key https://bugs.ruby-lang.org/issues/4418#change-67739 * Author: ohai (Ippei Obayashi) * Status: Rejected * Priority: Normal * Assignee: openssl * Target version: * ruby -v: ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-linux] * Backport: ---------------------------------------- =begin OpenSSL::PKey::DH#public_key がその名前に反して DH パラメータのみを複製して返しています。 require 'openssl' dh = OpenSSL::PKey::DH.generate(1024) # => パラメータと鍵の生成、時間がかかる p dh.pub_key # => 公開鍵の整数を表示 p dh.public_key.pub_key # => nil DH の場合、RSAなどのように「公開鍵とパラメータ」を取り出す需要はあまりない ように思われるので、名前を変える、もしくはメソッドを廃止するのが良いのではと思われます。 =end ---Files-------------------------------- fix_dh_dup.tar.gz (633 Bytes) -- https://bugs.ruby-lang.org/