aboutsummaryrefslogtreecommitdiffstats
path: root/examples/ossl_x509crl.rb
diff options
context:
space:
mode:
Diffstat (limited to 'examples/ossl_x509crl.rb')
-rwxr-xr-xexamples/ossl_x509crl.rb10
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."
+