summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorgotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-05-21 18:25:25 +0000
committergotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-05-21 18:25:25 +0000
commit795a0eb4a419b33a706473f60a2a974bb3ade705 (patch)
tree225f4ca1253633b465609d0c16c8d1af2e9bd7a3 /test
parent8519d3b343a6ba9da36fa4275a59ad9940d71f85 (diff)
downloadruby-795a0eb4a419b33a706473f60a2a974bb3ade705.tar.gz
ruby-795a0eb4a419b33a706473f60a2a974bb3ade705.tar.xz
ruby-795a0eb4a419b33a706473f60a2a974bb3ade705.zip
* test_x509crl.rb (test_basic): add test for CRL issuer.
* test_x509store.rb: test for OpenSSL::X509::Store * utils.rb (issue_crl): should set issuer's subject. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@6381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/openssl/test_x509crl.rb2
-rw-r--r--test/openssl/utils.rb1
2 files changed, 3 insertions, 0 deletions
diff --git a/test/openssl/test_x509crl.rb b/test/openssl/test_x509crl.rb
index 64d895f0f..444a00a58 100644
--- a/test/openssl/test_x509crl.rb
+++ b/test/openssl/test_x509crl.rb
@@ -37,11 +37,13 @@ class OpenSSL::TestX509CRL < Test::Unit::TestCase
crl = issue_crl([], 1, now, now+1600, [],
cert, @rsa2048, OpenSSL::Digest::SHA1.new)
assert_equal(1, crl.version)
+ assert_equal(cert.issuer.to_der, crl.issuer.to_der)
assert_equal(now, crl.last_update)
assert_equal(now+1600, crl.next_update)
crl = OpenSSL::X509::CRL.new(crl.to_der)
assert_equal(1, crl.version)
+ assert_equal(cert.issuer.to_der, crl.issuer.to_der)
assert_equal(now, crl.last_update)
assert_equal(now+1600, crl.next_update)
end
diff --git a/test/openssl/utils.rb b/test/openssl/utils.rb
index 6d95b787a..8c0d34c93 100644
--- a/test/openssl/utils.rb
+++ b/test/openssl/utils.rb
@@ -100,6 +100,7 @@ Q1VB8qkJN7rA7/2HrCR3gTsWNb1YhAsnFsoeRscC+LxXoXi9OAIUBG98h4tilg6S
issuer, issuer_key, digest)
crl = OpenSSL::X509::CRL.new
crl.version = 1
+ crl.issuer = issuer.subject
crl.last_update = lastup
crl.next_update = nextup
revoke_info.each{|serial, time, reason_code|