aboutsummaryrefslogtreecommitdiffstats
path: root/test/openssl/test_cipher.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/openssl/test_cipher.rb')
-rw-r--r--test/openssl/test_cipher.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/openssl/test_cipher.rb b/test/openssl/test_cipher.rb
index d87dedf73c..56061741bc 100644
--- a/test/openssl/test_cipher.rb
+++ b/test/openssl/test_cipher.rb
@@ -295,6 +295,13 @@ class OpenSSL::TestCipher < OpenSSL::TestCase
assert_equal tag1, tag2
end
+ def test_non_aead_cipher_set_auth_data
+ assert_raise(OpenSSL::Cipher::CipherError) {
+ cipher = OpenSSL::Cipher.new("aes-128-cfb").encrypt
+ cipher.auth_data = "123"
+ }
+ end
+
private
def new_encryptor(algo, **kwargs)