diff options
author | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-24 07:31:23 +0000 |
---|---|---|
committer | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-24 07:31:23 +0000 |
commit | 115f79a12e159f2c470d4b77d6b925613ea63fba (patch) | |
tree | 65a7e313612bef6245f1f0052308aace47e0da84 /sample/openssl/smime_read.rb | |
parent | a53b02a2f10dda36aa28e5071ad6976691c9f5b3 (diff) | |
download | ruby-115f79a12e159f2c470d4b77d6b925613ea63fba.tar.gz ruby-115f79a12e159f2c470d4b77d6b925613ea63fba.tar.xz ruby-115f79a12e159f2c470d4b77d6b925613ea63fba.zip |
* sample/openssl: reviewed and remove dependency on getopts.rb.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample/openssl/smime_read.rb')
-rw-r--r-- | sample/openssl/smime_read.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sample/openssl/smime_read.rb b/sample/openssl/smime_read.rb index 0f08f54f7..17394f9b8 100644 --- a/sample/openssl/smime_read.rb +++ b/sample/openssl/smime_read.rb @@ -1,12 +1,12 @@ -require 'getopts' +require 'optparse' require 'openssl' include OpenSSL -getopts nil, "c:", "k:", "C:" +options = ARGV.getopts("c:k:C:") -cert_file = $OPT_c -key_file = $OPT_k -ca_path = $OPT_C +cert_file = options["c"] +key_file = options["k"] +ca_path = options["C"] data = $stdin.read |