mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* sample/openssl/gen_csr.rb: follow OpenSSL::X509::Name change.
ASN.1 type of subject DN elements were wrong. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
04b5228aba
commit
d52c3b1e94
2 changed files with 8 additions and 7 deletions
|
@ -1,3 +1,8 @@
|
|||
Thu Jan 29 22:24:47 2004 NAKAMURA, Hiroshi <nakahiro@sarion.co.jp>
|
||||
|
||||
* sample/openssl/gen_csr.rb: follow OpenSSL::X509::Name change.
|
||||
ASN.1 type of subject DN elements were wrong.
|
||||
|
||||
Thu Jan 29 22:19:51 2004 NAKAMURA, Hiroshi <nakahiro@sarion.co.jp>
|
||||
|
||||
* test/*: remove $: trick. [ruby-dev:22763] use test/runner.rb to
|
||||
|
|
|
@ -19,13 +19,9 @@ keypair_file = $OPT_key
|
|||
csrout = $OPT_csrout || "csr.pem"
|
||||
keyout = $OPT_keyout || "keypair.pem"
|
||||
|
||||
name_str = ARGV.shift or usage()
|
||||
|
||||
$stdout.sync = true
|
||||
|
||||
name_ary = name_str.scan(/\s*([^\/,]+)\s*/).collect { |i| i[0].split("=") }
|
||||
p name_ary
|
||||
name = X509::Name.new(name_ary, OpenSSL::ASN1::PRINTABLESTRING)
|
||||
name_str = ARGV.shift or usage()
|
||||
name = X509::Name.parse(name_str)
|
||||
|
||||
keypair = nil
|
||||
if keypair_file
|
||||
|
@ -39,7 +35,7 @@ else
|
|||
end
|
||||
end
|
||||
|
||||
puts "Generating CSR for #{name_ary.inspect}"
|
||||
puts "Generating CSR for #{name_str}"
|
||||
|
||||
req = X509::Request.new
|
||||
req.version = 0
|
||||
|
|
Loading…
Reference in a new issue