summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/openssl/test_cipher.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/openssl/test_cipher.rb b/test/openssl/test_cipher.rb
index 70c963bbb0..eb2f4fec57 100644
--- a/test/openssl/test_cipher.rb
+++ b/test/openssl/test_cipher.rb
@@ -90,6 +90,15 @@ class OpenSSL::TestCipher < Test::Unit::TestCase
assert_equal(pt, c2.update(ct) + c2.final)
}
end
+
+ def test_AES_crush
+ 500.times do
+ assert_nothing_raised("[Bug #2768]") do
+ # it caused OpenSSL SEGV by uninitialized key
+ OpenSSL::Cipher::AES128.new("ECB").update "." * 17
+ end
+ end
+ end
end
end