1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
nahi 2010-09-10 08:54:50 +00:00
parent cb81b56de2
commit 7f438d8402
6 changed files with 22 additions and 14 deletions

View file

@ -1,3 +1,10 @@
Fri Sep 10 17:49:34 2010 NAKAMURA, Hiroshi <nahi@ruby-lang.org>
* ext/openssl/lib/openssl/x509-internal.rb: removed unused local
variable.
* test/openssl/*: less warnings while test running with -w.
Fri Sep 10 16:49:20 2010 Akinori MUSHA <knu@iDaemons.org>
* class.c (rb_scan_args): Add support for optional keyword

View file

@ -109,7 +109,6 @@ module OpenSSL
ary = []
while true
if md = TypeAndValue.match(str)
matched = md.to_s
remain = md.post_match
type = md[1]
value, tag = expand_value(md[2], md[3], md[4]) rescue nil

View file

@ -195,7 +195,6 @@ class OpenSSL::TestPair < Test::Unit::TestCase
ctx = OpenSSL::SSL::SSLContext.new()
ctx.ciphers = "ADH"
serv = TCPServer.new(host, port)
ssls = OpenSSL::SSL::SSLServer.new(serv, ctx)
port = serv.connect_address.ip_port

View file

@ -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

View file

@ -286,12 +286,13 @@ class OpenSSL::TestSSL < Test::Unit::TestCase
ssl.sync_close = true
str = "x" * 1000 + "\n"
ITERATIONS.times{
ssl.puts(str)
assert_equal(str, ssl.gets)
}
starttls(ssl)
OpenSSL::TestUtils.silent do
ITERATIONS.times{
ssl.puts(str)
assert_equal(str, ssl.gets)
}
starttls(ssl)
end
ITERATIONS.times{
ssl.puts(str)

View file

@ -120,14 +120,14 @@ class OpenSSL::TestX509Name < Test::Unit::TestCase
assert_equal(OpenSSL::ASN1::UTF8STRING, ary[2][2])
dn2 = "DC=org, DC=ruby-lang, CN=www.ruby-lang.org"
name = OpenSSL::X509::Name.parse(dn)
name = OpenSSL::X509::Name.parse(dn2)
ary = name.to_a
assert_equal(dn, name.to_s)
assert_equal("org", ary[0][1])
assert_equal("ruby-lang", ary[1][1])
assert_equal("www.ruby-lang.org", ary[2][1])
name = OpenSSL::X509::Name.parse(dn, @obj_type_tmpl)
name = OpenSSL::X509::Name.parse(dn2, @obj_type_tmpl)
ary = name.to_a
assert_equal(OpenSSL::ASN1::IA5STRING, ary[0][2])
assert_equal(OpenSSL::ASN1::IA5STRING, ary[1][2])