diff options
author | SHIBATA Hiroshi <hsbt@ruby-lang.org> | 2016-01-15 16:00:40 +0900 |
---|---|---|
committer | SHIBATA Hiroshi <hsbt@ruby-lang.org> | 2016-01-15 16:00:40 +0900 |
commit | bb3399a61c033323f0d465094d6674b7432addee (patch) | |
tree | 0e14832ef3aef19dc94968ee5b84fe93dd8b53f1 /test/test_pkey_dh.rb | |
parent | 725cd2c1b45bb5df8f70339b62d0e408c25bd7af (diff) | |
download | ruby-openssl-bb3399a61c033323f0d465094d6674b7432addee.tar.gz |
support 2048 bit length DH-key
Diffstat (limited to 'test/test_pkey_dh.rb')
-rw-r--r-- | test/test_pkey_dh.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/test_pkey_dh.rb b/test/test_pkey_dh.rb index 95e0e014..74060f62 100644 --- a/test/test_pkey_dh.rb +++ b/test/test_pkey_dh.rb @@ -17,6 +17,20 @@ T4h7KZ/2zmjvV+eF8kBUHBJAojUlzxKj4QeO2x20FP9X5xmNUXeDAgEC assert_equal params, OpenSSL::PKey::DH::DEFAULT_1024.to_s end + def test_DEFAULT_2048 + params = <<-eop +-----BEGIN DH PARAMETERS----- +MIIBCAKCAQEA7E6kBrYiyvmKAMzQ7i8WvwVk9Y/+f8S7sCTN712KkK3cqd1jhJDY +JbrYeNV3kUIKhPxWHhObHKpD1R84UpL+s2b55+iMd6GmL7OYmNIT/FccKhTcveab +VBmZT86BZKYyf45hUF9FOuUM9xPzuK3Vd8oJQvfYMCd7LPC0taAEljQLR4Edf8E6 +YoaOffgTf5qxiwkjnlVZQc3whgnEt9FpVMvQ9eknyeGB5KHfayAc3+hUAvI3/Cr3 +1bNveX5wInh5GDx1FGhKBZ+s1H+aedudCm7sCgRwv8lKWYGiHzObSma8A86KG+MD +7Lo5JquQ3DlBodj3IDyPrxIv96lvRPFtAwIBAg== +-----END DH PARAMETERS----- + eop + assert_equal params, OpenSSL::PKey::DH::DEFAULT_2048.to_s + end + def test_new dh = OpenSSL::PKey::DH.new(NEW_KEYLEN) assert_key(dh) |