From 7f438d8402f53c2f78c5c6512c3d2f68d9fb20ac Mon Sep 17 00:00:00 2001 From: nahi Date: Fri, 10 Sep 2010 08:54:50 +0000 Subject: * ext/openssl/lib/openssl/x509-internal.rb: removed unused local variable. * test/openssl/*: less warnings while test running with -w. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/openssl/test_pkcs7.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'test/openssl/test_pkcs7.rb') diff --git a/test/openssl/test_pkcs7.rb b/test/openssl/test_pkcs7.rb index 85e9b89b55..fa71b9e938 100644 --- a/test/openssl/test_pkcs7.rb +++ b/test/openssl/test_pkcs7.rb @@ -22,16 +22,16 @@ class OpenSSL::TestPKCS7 < Test::Unit::TestCase ["subjectKeyIdentifier","hash",false], ["authorityKeyIdentifier","keyid:always",false], ] - @ca_cert = issue_cert(ca, @rsa2048, 1, Time.now, Time.now+3600, ca_exts, + @ca_cert = issue_cert(ca, @rsa2048, 1, now, now+3600, ca_exts, nil, nil, OpenSSL::Digest::SHA1.new) ee_exts = [ ["keyUsage","Non Repudiation, Digital Signature, Key Encipherment",true], ["authorityKeyIdentifier","keyid:always",false], ["extendedKeyUsage","clientAuth, emailProtection, codeSigning",false], ] - @ee1_cert = issue_cert(ee1, @rsa1024, 2, Time.now, Time.now+1800, ee_exts, + @ee1_cert = issue_cert(ee1, @rsa1024, 2, now, now+1800, ee_exts, @ca_cert, @rsa2048, OpenSSL::Digest::SHA1.new) - @ee2_cert = issue_cert(ee2, @rsa1024, 3, Time.now, Time.now+1800, ee_exts, + @ee2_cert = issue_cert(ee2, @rsa1024, 3, now, now+1800, ee_exts, @ca_cert, @rsa2048, OpenSSL::Digest::SHA1.new) end @@ -109,7 +109,9 @@ class OpenSSL::TestPKCS7 < Test::Unit::TestCase flag = OpenSSL::PKCS7::BINARY|OpenSSL::PKCS7::DETACHED tmp = OpenSSL::PKCS7.sign(@ee1_cert, @rsa1024, data, ca_certs, flag) p7 = OpenSSL::PKCS7.new(tmp.to_der) - a1 = OpenSSL::ASN1.decode(p7) + assert_nothing_raised do + OpenSSL::ASN1.decode(p7) + end certs = p7.certificates signers = p7.signers -- cgit v1.2.3