OpenSSL::PKey::DH#public_key

Issue #4418 has been updated by nahi (Hiroshi N.).

Assignee changed from nahi (Hiroshi N.) to MartinBosslet (Martin
Bosslet)
Target version changed from 2.0.0 to next minor

I like to keep ext/openssl just reflects OpenSSL API but we already have
some exceptions in API for ease of use.

I postponed this to “next minor” but as we talked at RubyConf, we can
try it at openssl gem (vaporgem ATM.)

Bug #4418: OpenSSL::PKey::DH#public_key
https://bugs.ruby-lang.org/issues/4418#change-34146

Author: ohai (Ippei Obayashi)
Status: Assigned
Priority: Low
Assignee: MartinBosslet (Martin Bosslet)
Category: ext
Target version: next minor
ruby -v: ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-linux]

=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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs