#!/usr/bin/env ruby # frozen_string_literal: true require 'saml/kit' message = "Use the 'saml-kit-cli' gem instead."\ ' saml-kit-create-self-signed-certificate' Saml::Kit.deprecate(message) puts 'Enter Passphrase:' passphrase = STDIN.read.strip certificate, private_key = ::Xml::Kit::SelfSignedCertificate.new.create( passphrase: passphrase ) puts '** BEGIN File Format **' print certificate puts private_key puts '***********************' puts puts '*** BEGIN ENV Format **' puts certificate.inspect puts private_key.inspect puts '***********************' puts puts 'Private Key Passphrase:' puts passphrase.inspect