From e748554357464f99c80da988aba5ac725e18d277 Mon Sep 17 00:00:00 2001 From: Niklas van Schrick Date: Thu, 9 May 2024 23:18:04 +0200 Subject: [PATCH] Move keys to own directory --- .gitignore | 4 ++-- bin/console | 2 +- bin/create_key | 4 ++-- keys/.keep | 0 4 files changed, 5 insertions(+), 5 deletions(-) create mode 100644 keys/.keep diff --git a/.gitignore b/.gitignore index 406795b..66b7deb 100644 --- a/.gitignore +++ b/.gitignore @@ -8,8 +8,8 @@ /tmp/ .idea/ -license_key.key -license_key.pub +keys/* +!keys/.keep # rspec failure tracking .rspec_status diff --git a/bin/console b/bin/console index 8cf73d6..1c32079 100755 --- a/bin/console +++ b/bin/console @@ -7,7 +7,7 @@ require "code0/license" # You can add fixtures and/or initialization code here to make experimenting # with your gem easier. You can also use a different console, if you like. -key_file = File.read("license_key.#{ARGV.shift}") +key_file = File.read("keys/license_key_test.#{ARGV.shift}") key = OpenSSL::PKey::RSA.new(key_file) Code0::License.encryption_key = key diff --git a/bin/create_key b/bin/create_key index e8551ed..107ec53 100755 --- a/bin/create_key +++ b/bin/create_key @@ -8,9 +8,9 @@ require "code0/license" key_pair = OpenSSL::PKey::RSA.generate(4096) # Write it to a file to use in the license generation application. -File.write("license_key.key", key_pair.to_pem) +File.write("keys/license_key_test.key", key_pair.to_pem) # Extract the public key. public_key = key_pair.public_key # Write it to a file to ship along with the main application. -File.write("license_key.pub", public_key.to_pem) +File.write("keys/license_key_test.pub", public_key.to_pem) diff --git a/keys/.keep b/keys/.keep new file mode 100644 index 0000000..e69de29