Skip to content

Commit

Permalink
Move keys to own directory
Browse files Browse the repository at this point in the history
  • Loading branch information
Taucher2003 committed May 9, 2024
1 parent fda4794 commit e748554
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
/tmp/
.idea/

license_key.key
license_key.pub
keys/*
!keys/.keep

# rspec failure tracking
.rspec_status
2 changes: 1 addition & 1 deletion bin/console
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions bin/create_key
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Empty file added keys/.keep
Empty file.

0 comments on commit e748554

Please sign in to comment.