mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/openssl/test_pkey_dsa.rb: Test for DSA#syssign/sysverify.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
48a399d620
commit
f2c7a874a7
2 changed files with 12 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
Mon Jun 13 02:40:23 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
|
||||
|
||||
* test/openssl/test_pkey_dsa.rb: Test for DSA#syssign/sysverify.
|
||||
|
||||
Mon Jun 13 01:59:19 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
|
||||
|
||||
* ext/openssl/ossl_pkey_dh.c: completed documentation.
|
||||
|
|
|
@ -22,6 +22,14 @@ class OpenSSL::TestPKeyDSA < Test::Unit::TestCase
|
|||
assert_equal([], OpenSSL.errors)
|
||||
end
|
||||
|
||||
def test_sys_sign_verify
|
||||
key = OpenSSL::PKey::DSA.new(256)
|
||||
data = 'Sign me!'
|
||||
digest = OpenSSL::Digest::SHA1.digest(data)
|
||||
sig = key.syssign(digest)
|
||||
assert(key.sysverify(digest, sig))
|
||||
end
|
||||
|
||||
def test_sign_verify
|
||||
check_sign_verify(OpenSSL::Digest::DSS1.new)
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue