aboutsummaryrefslogtreecommitdiffstats
path: root/test/openssl/test_x509attr.rb
diff options
context:
space:
mode:
authorrhe <rhe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-08-29 05:47:09 +0000
committerrhe <rhe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-08-29 05:47:09 +0000
commitc9dc0164b8ad1cb23faf6120749bcc349a7bfd45 (patch)
tree831281099f54c0be80293785761a46688a0711f3 /test/openssl/test_x509attr.rb
parent28bf4d545fb7674fcdc99c93ba7476d320551d11 (diff)
downloadruby-c9dc0164b8ad1cb23faf6120749bcc349a7bfd45.tar.gz
import Ruby/OpenSSL 2.0.0.beta.1
* NEWS, {ext,test,sample}/openssl: Import Ruby/OpenSSL 2.0.0.beta.1. ext/openssl is now converted into a default gem. The full commit history since r55538 can be found at: https://github.com/ruby/openssl/compare/08e1881f5663...v2.0.0.beta.1 [Feature #9612] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/openssl/test_x509attr.rb')
-rw-r--r--test/openssl/test_x509attr.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/openssl/test_x509attr.rb b/test/openssl/test_x509attr.rb
index 1ba8a87536..d7473f1a29 100644
--- a/test/openssl/test_x509attr.rb
+++ b/test/openssl/test_x509attr.rb
@@ -12,6 +12,9 @@ class OpenSSL::TestX509Attribute < OpenSSL::TestCase
attr = OpenSSL::X509::Attribute.new("extReq", val)
assert_equal("extReq", attr.oid)
assert_equal(val.to_der, attr.value.to_der)
+
+ attr = OpenSSL::X509::Attribute.new("1.2.840.113549.1.9.14", val)
+ assert_equal("extReq", attr.oid)
end
def test_from_der
@@ -51,6 +54,14 @@ class OpenSSL::TestX509Attribute < OpenSSL::TestCase
}
assert_equal(test_der, attr.to_der)
end
+
+ def test_dup
+ val = OpenSSL::ASN1::Set([
+ OpenSSL::ASN1::UTF8String("abc123")
+ ])
+ attr = OpenSSL::X509::Attribute.new("challengePassword", val)
+ assert_equal(attr.to_der, attr.dup.to_der)
+ end
end
end