diff options
author | nils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2014-05-01 17:00:54 +0000 |
---|---|---|
committer | nils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2014-05-01 17:00:54 +0000 |
commit | cdfa385f1b5db5e979fbe170af266de4011a1c1a (patch) | |
tree | 1c0973281aabb230b192d5bbbeb933e438ee19ca | |
parent | added qmake-mac.sh and changed start_mac.app to gpg4usb.app (diff) | |
download | gpg4usb-cdfa385f1b5db5e979fbe170af266de4011a1c1a.tar.gz gpg4usb-cdfa385f1b5db5e979fbe170af266de4011a1c1a.zip |
changed keysizes in keygendialog
git-svn-id: http://cpunk.de/svn/src/gpg4usb/branches/0.4-beta@1092 34ebc366-c3a9-4b3c-9f84-69acf7962910
-rw-r--r-- | TODO | 2 | ||||
-rw-r--r-- | keygendialog.cpp | 33 | ||||
-rw-r--r-- | keygendialog.h | 10 |
3 files changed, 9 insertions, 36 deletions
@@ -46,6 +46,8 @@ Release 0.4 - Check, ig gpg is initialized correctly - On key import, check if key creation date is in the future - progress dialog for file encryption +- sign with multiple keys +- expire date in keygenerating needs to be implemented BUG: - check PGP-Mime diff --git a/keygendialog.cpp b/keygendialog.cpp index 35bf93a..2de67b1 100644 --- a/keygendialog.cpp +++ b/keygendialog.cpp @@ -41,23 +41,23 @@ void KeyGenDialog::generateKeyDialog() commentEdit = new QLineEdit(this); keySizeSpinBox = new QSpinBox(this); - keySizeSpinBox->setRange(768, 16384); + keySizeSpinBox->setRange(1024, 4096); keySizeSpinBox->setValue(2048); - keySizeSpinBox->setSingleStep(256); + keySizeSpinBox->setSingleStep(1024); keyTypeComboBox = new QComboBox(this); - keyTypeComboBox->addItem("DSA/Elgamal"); keyTypeComboBox->addItem("RSA"); + keyTypeComboBox->addItem("DSA/Elgamal"); keyTypeComboBox->setCurrentIndex(0); dateEdit = new QDateEdit(QDate::currentDate().addYears(5), this); dateEdit->setMinimumDate(QDate::currentDate()); dateEdit->setDisplayFormat("dd/MM/yyyy"); dateEdit->setCalendarPopup(true); - dateEdit->setEnabled(false); + dateEdit->setEnabled(true); expireCheckBox = new QCheckBox(this); - expireCheckBox->setCheckState(Qt::Checked); + expireCheckBox->setCheckState(Qt::Unchecked); passwordEdit = new QLineEdit(this); repeatpwEdit = new QLineEdit(this); @@ -109,8 +109,8 @@ void KeyGenDialog::generateKeyDialog() connect(expireCheckBox, SIGNAL(stateChanged(int)), this, SLOT(slotExpireBoxChanged())); connect(passwordEdit, SIGNAL(textChanged(QString)), this, SLOT(slotPasswordEditChanged())); - connect(keyTypeComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(slotKeyTypeChanged())); - connect(keySizeSpinBox, SIGNAL(valueChanged(int)), this, SLOT(slotKeySizeChanged())); +// connect(keyTypeComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(slotKeyTypeChanged())); +// connect(keySizeSpinBox, SIGNAL(valueChanged(int)), this, SLOT(slotKeySizeChanged())); this->setLayout(vbox2); } @@ -263,25 +263,6 @@ void KeyGenDialog::slotPasswordEditChanged() pwStrengthSlider->setValue(checkPassWordStrength()); update(); } -void KeyGenDialog::slotKeySizeChanged() -{ - if (keySizeSpinBox->value() > 2048 && lastKeySize <=2048) { - QMessageBox::warning(this, tr("Key size warning"), - tr("You've set the keysize to more than 2048 bits. This setting is for advanced users only. The key generation may take a very, very long time.")); - } - lastKeySize=keySizeSpinBox->value(); -} - -void KeyGenDialog::slotKeyTypeChanged() -{ - if (keyTypeComboBox->currentText() == "RSA") { - keySizeSpinBox->setMaximum(16384); - keySizeSpinBox->setMinimum(1024); - } else { - keySizeSpinBox->setMaximum(16384); - keySizeSpinBox->setMinimum(768); - } -} int KeyGenDialog::checkPassWordStrength() { diff --git a/keygendialog.h b/keygendialog.h index 325c6f4..bb4c186 100644 --- a/keygendialog.h +++ b/keygendialog.h @@ -79,16 +79,6 @@ private slots: void slotPasswordEditChanged(); /** - * @details When keysize changed, show message, when too large - */ - void slotKeySizeChanged(); - - /** - * @details When passwordedit changed, set keysize appropriately - */ - void slotKeyTypeChanged(); - - /** * @details check all lineedits for false entries. Show error, when there is one, otherwise generate the key */ void slotKeyGenAccept(); |