diff options
| author | nahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-09-04 10:31:29 +0000 |
|---|---|---|
| committer | nahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-09-04 10:31:29 +0000 |
| commit | 9bf2911d74cc5b6d8697acb6ed4e6c39b2b74f1e (patch) | |
| tree | acc6999a9b0b08b1bd645d0eadb9553d7c034b32 /ext/openssl/sample/cert2text.rb | |
| parent | 18facc3b3a67240e6ad860c41f57c88ddeebcd3d (diff) | |
| download | ruby-9bf2911d74cc5b6d8697acb6ed4e6c39b2b74f1e.tar.gz ruby-9bf2911d74cc5b6d8697acb6ed4e6c39b2b74f1e.tar.xz ruby-9bf2911d74cc5b6d8697acb6ed4e6c39b2b74f1e.zip | |
* sample/openssl: added. Sample of standard distribution library should be
locate in sample/{module_name}/*.
* ext/openssl/sample/*: removed. move to sample/openssl/*.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/sample/cert2text.rb')
| -rw-r--r-- | ext/openssl/sample/cert2text.rb | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/ext/openssl/sample/cert2text.rb b/ext/openssl/sample/cert2text.rb deleted file mode 100644 index 50da224e7..000000000 --- a/ext/openssl/sample/cert2text.rb +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env ruby - -require 'openssl' -include OpenSSL::X509 - -def cert2text(cert_str) - [Certificate, CRL, Request].each do |klass| - begin - puts klass.new(cert_str).to_text - return - rescue - end - end - raise ArgumentError.new('Unknown format.') -end - -if ARGV.empty? - cert2text(STDIN.read) -else - ARGV.each do |file| - cert2text(File.read(file)) - end -end |
