Skip to content

Commit 3a37327

Browse files
committed
+spec
1 parent c1e25e1 commit 3a37327

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/test/ruby/test_cipher.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,4 +490,12 @@ def test_encrypt_aes_256_cbc_modifies_buffer
490490
assert_equal buffer, expected
491491
end
492492

493+
def test_encrypt_aes_256_cbc_invalid_buffer
494+
cipher = OpenSSL::Cipher.new("AES-256-CBC")
495+
cipher.key = "a" * 32
496+
cipher.encrypt
497+
buffer = Object.new
498+
assert_raise(TypeError) { cipher.update('bar' * 10, buffer) }
499+
end
500+
493501
end

0 commit comments

Comments
 (0)