From c4b709c79c0f794bbe765c11d5dc644beeb48522 Mon Sep 17 00:00:00 2001 From: nils Date: Fri, 25 Sep 2009 11:26:27 +0000 Subject: 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 --- keymgmt.cpp | 8 +++++--- 1 file 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 += ""; + if (!(passwordEdit->text().isEmpty())) { + keyGenParams += "Passphrase: " + passwordEdit->text() + "\n"; + } + keyGenParams += ""; KeyGenThread *kg = new KeyGenThread(keyGenParams, mCtx); kg->start(); -- cgit v1.2.3