diff options
author | Saturneric <[email protected]> | 2022-05-07 17:01:29 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2022-05-07 17:01:29 +0000 |
commit | f1a2ce4bcb7d46981d1fc471e517709f076d9365 (patch) | |
tree | e9d42769dccaf452ba14394e0e0fe574fcd086dd /src/core/function/gpg/GpgKeyImportExporter.cpp | |
parent | fix: add openssl dependency for windows ci (diff) | |
download | GpgFrontend-f1a2ce4bcb7d46981d1fc471e517709f076d9365.tar.gz GpgFrontend-f1a2ce4bcb7d46981d1fc471e517709f076d9365.zip |
refactor: develop 2.0.6 start
1. delete smtp ability
2. change libs link type to dramatic
Diffstat (limited to 'src/core/function/gpg/GpgKeyImportExporter.cpp')
-rw-r--r-- | src/core/function/gpg/GpgKeyImportExporter.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/core/function/gpg/GpgKeyImportExporter.cpp b/src/core/function/gpg/GpgKeyImportExporter.cpp index 0f1ebfa2..206282ae 100644 --- a/src/core/function/gpg/GpgKeyImportExporter.cpp +++ b/src/core/function/gpg/GpgKeyImportExporter.cpp @@ -31,6 +31,9 @@ #include "GpgConstants.h" #include "GpgKeyGetter.h" +GpgFrontend::GpgKeyImportExporter::GpgKeyImportExporter(int channel) + : SingletonFunctionObject<GpgKeyImportExporter>(channel) {} + /** * Import key pair * @param inBuffer input byte array @@ -176,3 +179,23 @@ bool GpgFrontend::GpgKeyImportExporter::ExportSecretKeyShortest( std::swap(out_buffer, temp_out_buffer); return check_gpg_error_2_err_code(err) == GPG_ERR_NO_ERROR; } + +GpgFrontend::GpgImportInformation::GpgImportInformation() = default; + +GpgFrontend::GpgImportInformation::GpgImportInformation( + gpgme_import_result_t result) { + if (result->unchanged) unchanged = result->unchanged; + if (result->considered) considered = result->considered; + if (result->no_user_id) no_user_id = result->no_user_id; + if (result->imported) imported = result->imported; + if (result->imported_rsa) imported_rsa = result->imported_rsa; + if (result->unchanged) unchanged = result->unchanged; + if (result->new_user_ids) new_user_ids = result->new_user_ids; + if (result->new_sub_keys) new_sub_keys = result->new_sub_keys; + if (result->new_signatures) new_signatures = result->new_signatures; + if (result->new_revocations) new_revocations = result->new_revocations; + if (result->secret_read) secret_read = result->secret_read; + if (result->secret_imported) secret_imported = result->secret_imported; + if (result->secret_unchanged) secret_unchanged = result->secret_unchanged; + if (result->not_imported) not_imported = result->not_imported; +} |