mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-28 05:14:34 +00:00
Generate keys that actually work with openssl.
According to FIPS 186-2 standard DSA keys should be >= 512 and <= 1024 bits. Using a 2048 bit key on my system yields an openssl error in Sparkle's SUDSAVerifier and causes the update to be rejected. The error says (can be read only after hacking on Sparkle's code): error:0A071066:dsa routines:DSA_do_verify:bad q value
This commit is contained in:
1 parent
561bbbe294
commit
40616b864a
1 file changed
+3
-2
+3
-2
@@ -2,12 +2,13 @@
|
||||
["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!"
|
||||
exit
|
||||
end
|
||||
end
|
||||
`openssl dsaparam 2048 < /dev/urandom > dsaparam.pem`
|
||||
`openssl dsaparam 1024 < /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"
|
||||
If you lose it, your users will be unable to upgrade!\n"
|
||||
Reference in new issue
Block a user