main
1#!/usr/bin/env ruby
2# frozen_string_literal: true
3
4require 'saml/kit'
5
6message = "Use the 'saml-kit-cli' gem instead."\
7 ' saml-kit-create-self-signed-certificate'
8Saml::Kit.deprecate(message)
9
10puts 'Enter Passphrase:'
11passphrase = STDIN.read.strip
12certificate, private_key = ::Xml::Kit::SelfSignedCertificate.new.create(
13 passphrase: passphrase
14)
15
16puts '** BEGIN File Format **'
17print certificate
18puts private_key
19puts '***********************'
20
21puts
22
23puts '*** BEGIN ENV Format **'
24puts certificate.inspect
25puts private_key.inspect
26puts '***********************'
27
28puts
29puts 'Private Key Passphrase:'
30puts passphrase.inspect