From ea7c0113486f336f3fe14435e1ce5eb55ad4eca9 Mon Sep 17 00:00:00 2001 From: Saturneric Date: Fri, 3 Dec 2021 06:44:09 +0800 Subject: Fixed 1. Ci Fixed for New Version. 2. Bugs fixed for cross-platform. 3. Bugs fixed for i18n. --- src/gpg/function/GpgKeyOpera.cpp | 67 ++++++++++++++++++++++------------------ 1 file changed, 37 insertions(+), 30 deletions(-) (limited to 'src/gpg/function/GpgKeyOpera.cpp') diff --git a/src/gpg/function/GpgKeyOpera.cpp b/src/gpg/function/GpgKeyOpera.cpp index a7371904..c60f9157 100644 --- a/src/gpg/function/GpgKeyOpera.cpp +++ b/src/gpg/function/GpgKeyOpera.cpp @@ -24,7 +24,7 @@ #include "gpg/function/GpgKeyOpera.h" -#include +#include #include #include #include @@ -99,38 +99,45 @@ void GpgFrontend::GpgKeyOpera::GenerateRevokeCert( using boost::asio::async_write; using boost::process::async_pipe; +#ifndef WINDOWS GpgCommandExecutor::GetInstance().Execute( args, [](async_pipe& in, async_pipe& out) -> void { - boost::asio::streambuf buff; - boost::asio::read_until(in, buff, '\n'); - - std::istream is(&buff); - - while (!is.eof()) { - std::string line; - is >> line; - LOG(INFO) << "line" << line; - boost::algorithm::trim(line); - if (line == std::string("[GNUPG:] GET_BOOL gen_revoke.okay")) { - - } else if (line == - std::string( - "[GNUPG:] GET_LINE ask_revocation_reason.code")) { - - } else if (line == - std::string( - "[GNUPG:] GET_LINE ask_revocation_reason.text")) { - - } else if (line == - std::string("[GNUPG:] GET_BOOL openfile.overwrite.okay")) { - - } else if (line == - std::string( - "[GNUPG:] GET_BOOL ask_revocation_reason.okay")) { - - } - } + // boost::asio::streambuf buff; + // boost::asio::read_until(in, buff, '\n'); + // + // std::istream is(&buff); + // + // while (!is.eof()) { + // std::string line; + // is >> line; + // LOG(INFO) << "line" << line; + // boost::algorithm::trim(line); + // if (line == std::string("[GNUPG:] GET_BOOL + // gen_revoke.okay")) { + // + // } else if (line == + // std::string( + // "[GNUPG:] GET_LINE + // ask_revocation_reason.code")) { + // + // } else if (line == + // std::string( + // "[GNUPG:] GET_LINE + // ask_revocation_reason.text")) { + // + // } else if (line == + // std::string("[GNUPG:] GET_BOOL + // openfile.overwrite.okay")) { + // + // } else if (line == + // std::string( + // "[GNUPG:] GET_BOOL + // ask_revocation_reason.okay")) { + // + // } + // } }); +#endif } /** -- cgit v1.2.3