diff --git a/ChangeLog b/ChangeLog index d1edf4ba34..d2c33459d5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Jan 29 22:24:47 2004 NAKAMURA, Hiroshi + + * 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 * test/*: remove $: trick. [ruby-dev:22763] use test/runner.rb to diff --git a/sample/openssl/gen_csr.rb b/sample/openssl/gen_csr.rb index 5d6a6542ab..7c7f559995 100644 --- a/sample/openssl/gen_csr.rb +++ b/sample/openssl/gen_csr.rb @@ -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