diff options
author | Saturn&Eric <[email protected]> | 2023-07-14 15:35:39 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2023-07-14 15:35:39 +0000 |
commit | 9cee8cf8e3cce9af62549f824823049fdac0276f (patch) | |
tree | d2cb1899825cd12b814b4a1fa1097dd858137707 /src/ui/dialog/keypair_details/KeyPairOperaTab.cpp | |
parent | Merge pull request #108 from saturneric/dev/2.1.0/main (diff) | |
parent | fix: slove border issues at GernalDialog (diff) | |
download | GpgFrontend-9cee8cf8e3cce9af62549f824823049fdac0276f.tar.gz GpgFrontend-9cee8cf8e3cce9af62549f824823049fdac0276f.zip |
Merge pull request #109 from saturneric/dev/2.1.0/main
Develop 2.1.1.6
Diffstat (limited to 'src/ui/dialog/keypair_details/KeyPairOperaTab.cpp')
-rw-r--r-- | src/ui/dialog/keypair_details/KeyPairOperaTab.cpp | 32 |
1 files changed, 4 insertions, 28 deletions
diff --git a/src/ui/dialog/keypair_details/KeyPairOperaTab.cpp b/src/ui/dialog/keypair_details/KeyPairOperaTab.cpp index 13c857a0..c5d0670a 100644 --- a/src/ui/dialog/keypair_details/KeyPairOperaTab.cpp +++ b/src/ui/dialog/keypair_details/KeyPairOperaTab.cpp @@ -333,34 +333,10 @@ void KeyPairOperaTab::slot_gen_revoke_cert() { if (dialog.exec()) m_output_file_name = dialog.selectedFiles().front(); - if (!m_output_file_name.isEmpty()) - CommonUtils::GetInstance()->SlotExecuteGpgCommand( - {"--command-fd", "0", "--status-fd", "1", "--no-tty", "-o", - m_output_file_name, "--gen-revoke", m_key_.GetFingerprint().c_str()}, - [](QProcess* proc) -> void { - // Code From Gpg4Win - while (proc->canReadLine()) { - const QString line = QString::fromUtf8(proc->readLine()).trimmed(); - SPDLOG_DEBUG("line: {}", line.toStdString()); - if (line == QLatin1String("[GNUPG:] GET_BOOL gen_revoke.okay")) { - proc->write("y\n"); - } else if (line == QLatin1String("[GNUPG:] GET_LINE " - "ask_revocation_reason.code")) { - proc->write("0\n"); - } else if (line == QLatin1String("[GNUPG:] GET_LINE " - "ask_revocation_reason.text")) { - proc->write("\n"); - } else if (line == - QLatin1String( - "[GNUPG:] GET_BOOL openfile.overwrite.okay")) { - // We asked before - proc->write("y\n"); - } else if (line == QLatin1String("[GNUPG:] GET_BOOL " - "ask_revocation_reason.okay")) { - proc->write("y\n"); - } - } - }); + if (!m_output_file_name.isEmpty()) { + GpgKeyOpera::GetInstance().GenerateRevokeCert( + m_key_, m_output_file_name.toStdString()); + } } void KeyPairOperaTab::slot_modify_password() { |