aboutsummaryrefslogtreecommitdiffstats
path: root/examples/ossl_x509crl.rb
blob: e9fb813d7ec52747c974ac1ee1541de30a5f16dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env ruby

require 'openssl'
include OpenSSL
include X509
include PKey

p ca = Certificate.new(File.read("./0cert.pem"))
p key = ca.public_key
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))
crl.revoked.each {|rev| p rev.time}

puts "DOME."