There was an error while loading. Please reload this page.
1 parent 767a921 commit b402d38Copy full SHA for b402d38
bin/create_key
@@ -7,10 +7,12 @@ require "code0/license"
7
# Generate a key pair. You should do this only once.
8
key_pair = OpenSSL::PKey::RSA.generate(4096)
9
10
+environment = ARGV.shift || 'test'
11
+
12
# Write it to a file to use in the license generation application.
-File.write("keys/license_encryption_key_test.key", key_pair.to_pem)
13
+File.write("keys/license_encryption_key_#{environment}.key", key_pair.to_pem)
14
15
# Extract the public key.
16
public_key = key_pair.public_key
17
# Write it to a file to ship along with the main application.
-File.write("keys/license_encryption_key_test.pub", public_key.to_pem)
18
+File.write("keys/license_encryption_key_#{environment}.pub", public_key.to_pem)
0 commit comments