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

require 'openssl'
include OpenSSL
include X509
include PKey

p ca = Certificate.new(File.open("./cacert.pem").read)
p key = ca.public_key
p crl = CRL.new(File.open("./01crl.pem").read)
p crl.issuer.to_s
p crl.verify key
p crl.verify RSA.new(1024)
crl.revoked.each {|rev| p rev.time}