class Net::Openvpn::Generators::Keys::Client

def generate


Returns true if the generation was successful

Raises `Net::Openvpn::Errors::KeyGeneration` if there were problems

Generates the certificates for a VPN client
def generate
  @key_dir.exist?  or raise Errors::KeyGeneration, "Key directory has not been generated yet"
  Authority.exist? or raise Errors::KeyGeneration, "Certificate Authority has not been created"
  revoke! if valid?
  FileUtils.cd(@props[:easy_rsa]) do
    system "#{cli_prop_vars} ./pkitool #{@name}"
  end
  exist? or raise Errors::KeyGeneration, "Keys do not exist"
  valid? or raise Errors::KeyGeneration, "keys are not valid"
  true
end