diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/openssl/test_asn1.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/openssl/test_asn1.rb b/test/openssl/test_asn1.rb index bdd4f88719..4fd4771d7b 100644 --- a/test/openssl/test_asn1.rb +++ b/test/openssl/test_asn1.rb @@ -430,4 +430,14 @@ class OpenSSL::TestASN1 < Test::Unit::TestCase end end + def test_primitive_inf_length + assert_raises(OpenSSL::ASN1::ASN1Error) do + spec = %w{ 02 80 02 01 01 00 00 } + raw = [spec.join('')].pack('H*') + OpenSSL::ASN1.decode(raw) + OpenSSL::ASN1.decode_all(raw) + end + end + end if defined?(OpenSSL) + |