diff options
author | Zachary Scott <e@zzak.io> | 2015-09-23 09:26:00 -0400 |
---|---|---|
committer | Zachary Scott <e@zzak.io> | 2015-09-23 09:26:00 -0400 |
commit | 03c088b936c1bea55687c6345799b28b98c24ee9 (patch) | |
tree | 8b2e7b7ecc54576ecf321717240429c5f168fb40 /test/test_pkey_dh.rb | |
parent | 4df76773f42ddedf8e0907615a43b144f63f3a83 (diff) | |
download | ruby-openssl-03c088b936c1bea55687c6345799b28b98c24ee9.tar.gz |
Sync with ruby trunk
Diffstat (limited to 'test/test_pkey_dh.rb')
-rw-r--r-- | test/test_pkey_dh.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/test_pkey_dh.rb b/test/test_pkey_dh.rb index 8bf98166..040d0309 100644 --- a/test/test_pkey_dh.rb +++ b/test/test_pkey_dh.rb @@ -6,6 +6,27 @@ class OpenSSL::TestPKeyDH < Test::Unit::TestCase NEW_KEYLEN = 256 + def test_DEFAULT_512 + params = <<-eop +-----BEGIN DH PARAMETERS----- +MEYCQQD0zXHljRg/mJ9PYLACLv58Cd8VxBxxY7oEuCeURMiTqEhMym16rhhKgZG2 +zk2O9uUIBIxSj+NKMURHGaFKyIvLAgEC +-----END DH PARAMETERS----- + eop + assert_equal params, OpenSSL::PKey::DH::DEFAULT_512.to_s + end + + def test_DEFAULT_1024 + params = <<-eop +-----BEGIN DH PARAMETERS----- +MIGHAoGBAJ0lOVy0VIr/JebWn0zDwY2h+rqITFOpdNr6ugsgvkDXuucdcChhYExJ +AV/ZD2AWPbrTqV76mGRgJg4EddgT1zG0jq3rnFdMj2XzkBYx3BVvfR0Arnby0RHR +T4h7KZ/2zmjvV+eF8kBUHBJAojUlzxKj4QeO2x20FP9X5xmNUXeDAgEC +-----END DH PARAMETERS----- + eop + assert_equal params, OpenSSL::PKey::DH::DEFAULT_1024.to_s + end + def test_new dh = OpenSSL::PKey::DH.new(NEW_KEYLEN) assert_key(dh) |