Fixed Haiku gpg key generation

Former-commit-id: 1a441cea301049608232742f4fddcc6338adf0a7 [formerly a673404fae]
Former-commit-id: 5ad1eef49307617c0f629f0a660d977f1784d380
This commit is contained in:
2022-07-11 19:06:58 -04:00
parent 790121e7ea
commit bfb830c5e5
+6 -1
View File
@@ -225,7 +225,12 @@ def tweak(): # runs configuration wizard
open(path.expanduser('~/.config/sshyp/gpg-gen'), 'w').write('Key-Type: 1\nKey-Length: 4096\nKey-Usage:\
sign encrypt\nName-Real: sshyp\nName-Comment: password manager encryption\nName-Email: \
https://github.com/rwinkhart/sshyp\nExpire-Date: 0')
run(f"{gpg} --batch --generate-key '{path.expanduser('~/.config/sshyp/gpg-gen')}'", shell=True)
if uname()[0] == 'Haiku':
run(gpg + ' --batch --generate-key --passphrase ' + "'" +
input('Please enter the passphrase to\nprotect your new key\nPassphrase: ') + "'" + " '" +
path.expanduser('~/.config/sshyp/gpg-gen') + "'", shell=True)
else:
run(f"{gpg} --batch --generate-key '{path.expanduser('~/.config/sshyp/gpg-gen')}'", shell=True)
_gpg_id = run(f"{gpg} -k", shell=True, stdout=PIPE, text=True).stdout.split('\n')[-4].strip()
# lock file generation