5 options = ARGV.getopts("c:k:C:")
7 cert_file = options["c"]
8 key_file = options["k"]
13 cert = X509::Certificate.new(File::read(cert_file))
14 key = PKey::RSA.new(File::read(key_file))
15 p7enc = PKCS7::read_smime(data)
16 data = p7enc.decrypt(key, cert)
18 store = X509::Store.new
19 store.add_path(ca_path)
20 p7sig = PKCS7::read_smime(data)
21 if p7sig.verify([], store)