diff options
author | Michal Rokos <m.rokos@sh.cvut.cz> | 2003-07-21 07:00:16 +0000 |
---|---|---|
committer | Michal Rokos <m.rokos@sh.cvut.cz> | 2003-07-21 07:00:16 +0000 |
commit | b4646f832b9f92e51ccf36823a9e3254c30e2c7c (patch) | |
tree | fae3456053b6793a12b261da6248385c343df5d1 /examples/ossl_x509crl.rb | |
parent | 6b01bbcc031af7536a79426aa0893cab400a86cc (diff) | |
download | ruby-openssl-history-b4646f832b9f92e51ccf36823a9e3254c30e2c7c.tar.gz |
Digest is Ruby compatible again, more examples are working
Diffstat (limited to 'examples/ossl_x509crl.rb')
-rwxr-xr-x | examples/ossl_x509crl.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/examples/ossl_x509crl.rb b/examples/ossl_x509crl.rb index 7e19ac0..e9fb813 100755 --- a/examples/ossl_x509crl.rb +++ b/examples/ossl_x509crl.rb @@ -5,12 +5,14 @@ include OpenSSL include X509 include PKey -p ca = Certificate.new(File.open("./cacert.pem").read) +p ca = Certificate.new(File.read("./0cert.pem")) p key = ca.public_key -p crl = CRL.new(File.open("./01crl.pem").read) +p crl = CRL.new(File.read("./0crl.pem")) puts crl.to_text p crl.issuer.to_s -p crl.verify key -p crl.verify RSA.new(1024) +p crl.verify(key) +p crl.verify(RSA.new(1024)) crl.revoked.each {|rev| p rev.time} +puts "DOME." + |