aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/key_generate/KeygenDialog.cpp
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2022-11-26 17:52:27 +0000
committerSaturneric <[email protected]>2022-11-26 17:52:27 +0000
commitefd722000d7ea6648b11b5627b1c833bdf64b0af (patch)
tree4e540b27671783e722519cf5a84ef767386e86e2 /src/ui/dialog/key_generate/KeygenDialog.cpp
parentfeat: change submodules url (diff)
downloadGpgFrontend-efd722000d7ea6648b11b5627b1c833bdf64b0af.tar.gz
GpgFrontend-efd722000d7ea6648b11b5627b1c833bdf64b0af.zip
feat: support generate ecc key
1. support elliptische kurve nist
Diffstat (limited to 'src/ui/dialog/key_generate/KeygenDialog.cpp')
-rw-r--r--src/ui/dialog/key_generate/KeygenDialog.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ui/dialog/key_generate/KeygenDialog.cpp b/src/ui/dialog/key_generate/KeygenDialog.cpp
index 42160ec9..b7ba6369 100644
--- a/src/ui/dialog/key_generate/KeygenDialog.cpp
+++ b/src/ui/dialog/key_generate/KeygenDialog.cpp
@@ -254,8 +254,9 @@ void KeyGenDialog::slot_authentication_box_changed(int state) {
void KeyGenDialog::slot_activated_key_type(int index) {
qDebug() << "key type index changed " << index;
- gen_key_info_->SetAlgo(
- this->key_type_combo_box_->itemText(index).toStdString());
+ // check
+ assert(gen_key_info_->GetSupportedKeyAlgo().size() > index);
+ gen_key_info_->SetAlgo(gen_key_info_->GetSupportedKeyAlgo()[index]);
refresh_widgets_state();
}
@@ -357,7 +358,7 @@ QGroupBox* KeyGenDialog::create_basic_info_group_box() {
key_type_combo_box_ = new QComboBox(this);
for (auto& algo : GenKeyInfo::GetSupportedKeyAlgo()) {
- key_type_combo_box_->addItem(QString::fromStdString(algo));
+ key_type_combo_box_->addItem(QString::fromStdString(algo.first));
}
if (!GenKeyInfo::GetSupportedKeyAlgo().empty()) {
key_type_combo_box_->setCurrentIndex(0);