class Net::Openvpn::Generators::Keys::Base

def revoke!


failed to be revoked
raises `Net::Openvpn::Errors::CertificateRevocation` if the key

not exist or are not valid
Returns true if the keys were revoked or false if the keys do

Revokes the keys
def revoke!
  return false unless exist? and valid?
  FileUtils.cd(Openvpn.props[:easy_rsa]) do
    output = %x[#{cli_prop_vars} ./revoke-full #{@name}]
    raise Errors::CertificateRevocation, "Revoke command failed" if !output.include? "error 23" # error 23 means key was revoked
  end
  !valid? or raise Errors::CertificateRevocation, "Certificates were still valid after being revoked"
  true
end