From: Yui NARUSE Date: 2011-05-19T08:18:47+09:00 Subject: [ruby-core:36323] [Ruby 1.9 - Bug #4734] [ext/openssl] DSA#sign error Issue #4734 has been updated by Yui NARUSE. I can reproduce it with * ruby 1.9.3dev (2011-05-18 trunk 31621) [x86_64-freebsd8.2] * OpenSSL 0.9.8q 2 Dec 2010" ---------------------------------------- Bug #4734: [ext/openssl] DSA#sign error http://redmine.ruby-lang.org/issues/4734 Author: Martin Bosslet Status: Assigned Priority: Normal Assignee: Martin Bosslet Category: ext Target version: 1.9.3 ruby -v: ruby 1.9.3dev (2011-05-17 trunk 31593) [i686-linux] Hi, imo the following should work just fine: data = 'Sign me!' digest = OpenSSL::Digest::SHA256.new pkey = OpenSSL::PKey::DSA.new(512) signature = pkey.sign(digest, data) At least it does for PKey::RSA. But the above produces (OpenSSL 0.9.8k): in `sign': wrong public key type (OpenSSL::PKey::PKeyError) I'll look into it - but I'd appreciate if someone could please verify that this is really a bug and try to reproduce the error? Regards, Martin -- http://redmine.ruby-lang.org