diff options
author | randomguy3 <randomguy3@7c02a99a-9b00-45e3-bf44-6f3dd7fddb64> | 2012-01-06 13:44:40 +0000 |
---|---|---|
committer | randomguy3 <randomguy3@7c02a99a-9b00-45e3-bf44-6f3dd7fddb64> | 2012-01-06 13:44:40 +0000 |
commit | 2ed61cfb3ad3d404b9a44bbb3f4c8083b469ae22 (patch) | |
tree | 9939c67d95720a330bd7b884363d801cc7d5811d /scripts/generate_keys.rb |
Move everything into trunk.
Also add branches and tags directories.
git-svn-id: https://tikzit.svn.sourceforge.net/svnroot/tikzit/trunk@348 7c02a99a-9b00-45e3-bf44-6f3dd7fddb64
Diffstat (limited to 'scripts/generate_keys.rb')
-rwxr-xr-x | scripts/generate_keys.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/generate_keys.rb b/scripts/generate_keys.rb new file mode 100755 index 0000000..b22439c --- /dev/null +++ b/scripts/generate_keys.rb @@ -0,0 +1,13 @@ +#!/usr/bin/ruby +["dsaparam.pem", "dsa_priv.pem", "dsa_pub.pem"].each do |file| + if File.exist? file + puts "There's already a #{file} here! Move it aside or be more careful!" + end +end +`openssl dsaparam 2048 < /dev/urandom > dsaparam.pem` +`openssl gendsa dsaparam.pem -out dsa_priv.pem` +`openssl dsa -in dsa_priv.pem -pubout -out dsa_pub.pem` +`rm dsaparam.pem` +puts "\nGenerated private and public keys: dsa_priv.pem and dsa_pub.pem.\n +BACK UP YOUR PRIVATE KEY AND KEEP IT SAFE!\n +If you lose it, your users will be unable to upgrade!\n"
\ No newline at end of file |