diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2017-11-25 22:04:04 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2017-11-25 22:04:04 +0900 |
commit | ed15e4c51f517227e092b1e3b993b04a27c92e05 (patch) | |
tree | 76bbb1bc97bc7e4fd1423bb6aaa43631651b3a90 /test/test_cipher.rb | |
parent | 4e53940676a23a021d2f0543c2349396ea3cf430 (diff) | |
parent | f3b596e858ea1604d0ea5653bffe80672c22f079 (diff) | |
download | ruby-openssl-ed15e4c51f517227e092b1e3b993b04a27c92e05.tar.gz |
Merge branch 'maint'
* maint:
History.md: fix a typo
x509cert, x509crl, x509req, ns_spki: check sanity of public key
pkey: make pkey_check_public_key() non-static
test/test_cipher: fix test_non_aead_cipher_set_auth_data failure
cipher: disallow setting AAD for non-AEAD ciphers
test/test_ssl_session: skip tests for session_remove_cb
appveyor.yml: remove 'openssl version' line
Diffstat (limited to 'test/test_cipher.rb')
-rw-r--r-- | test/test_cipher.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/test_cipher.rb b/test/test_cipher.rb index d87dedf7..56061741 100644 --- a/test/test_cipher.rb +++ b/test/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) |