We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1f95043 commit 14b06b0Copy full SHA for 14b06b0
src/test/ruby/test_asn1.rb
@@ -21,6 +21,16 @@ def test_encode_integer
21
assert_equal i, OpenSSL::ASN1.decode(ai.to_der).value
22
end
23
24
+ def test_encode_asn1_data
25
+ ai = OpenSSL::ASN1::ASN1Data.new(i = "bla", 0, :APPLICATION)
26
+ assert_equal i, OpenSSL::ASN1.decode(ai.to_der).value
27
+
28
+ ai = OpenSSL::ASN1::ASN1Data.new(i = ["bla"], 0, :APPLICATION)
29
30
31
+ assert_raise(TypeError) { OpenSSL::ASN1::ASN1Data.new(1).to_der }
32
+ end
33
34
def test_encode_nil
35
#Primitives raise TypeError, Constructives NoMethodError
36
0 commit comments