diff options
author | nils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2009-09-25 11:26:27 +0000 |
---|---|---|
committer | nils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2009-09-25 11:26:27 +0000 |
commit | c4b709c79c0f794bbe765c11d5dc644beeb48522 (patch) | |
tree | f10de887eeeeb78f092cbdbeb8d3b96518060ca6 | |
parent | changed *.* to * in all file dialogs to show really all files (diff) | |
download | gpg4usb-c4b709c79c0f794bbe765c11d5dc644beeb48522.tar.gz gpg4usb-c4b709c79c0f794bbe765c11d5dc644beeb48522.zip |
fixed bug in key generating, that no passphrase was given for never expiring keys
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@225 34ebc366-c3a9-4b3c-9f84-69acf7962910
-rwxr-xr-x | keymgmt.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/keymgmt.cpp b/keymgmt.cpp index 68e4a3d..7dfa676 100755 --- a/keymgmt.cpp +++ b/keymgmt.cpp @@ -305,10 +305,12 @@ void KeyMgmt::keyGenAccept() if (expireCheckBox->checkState()) { keyGenParams += "Expire-Date: 0\n"; } else { - keyGenParams += "Expire-Date: " + dateEdit->sectionText(QDateTimeEdit::YearSection) + "-" + dateEdit->sectionText(QDateTimeEdit::MonthSection) + "-" + dateEdit->sectionText(QDateTimeEdit::DaySection) + "\n" - "Passphrase: " + passwordEdit->text() + "\n"; + keyGenParams += "Expire-Date: " + dateEdit->sectionText(QDateTimeEdit::YearSection) + "-" + dateEdit->sectionText(QDateTimeEdit::MonthSection) + "-" + dateEdit->sectionText(QDateTimeEdit::DaySection) + "\n"; } - keyGenParams += "</GnupgKeyParms>"; + if (!(passwordEdit->text().isEmpty())) { + keyGenParams += "Passphrase: " + passwordEdit->text() + "\n"; + } + keyGenParams += "</GnupgKeyParms>"; KeyGenThread *kg = new KeyGenThread(keyGenParams, mCtx); kg->start(); |