diff options
author | Saturn&Eric <[email protected]> | 2023-04-04 19:25:40 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2023-04-04 19:25:40 +0000 |
commit | 770e0d6ab61ec9ade91f1109244043195d99b720 (patch) | |
tree | c9605d79f53468176225d2c9314fceb0e036791e /src/core/GpgContext.cpp | |
parent | Merge pull request #93 from saturneric/dev/2.0.10/main (diff) | |
parent | feat: upgrade version to 2.1.1 (diff) | |
download | GpgFrontend-770e0d6ab61ec9ade91f1109244043195d99b720.tar.gz GpgFrontend-770e0d6ab61ec9ade91f1109244043195d99b720.zip |
Merge pull request #95 from saturneric/dev/2.1.0/main
Develop 2.1.1.1
Diffstat (limited to 'src/core/GpgContext.cpp')
-rw-r--r-- | src/core/GpgContext.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/GpgContext.cpp b/src/core/GpgContext.cpp index f8dbebc6..47ff77c4 100644 --- a/src/core/GpgContext.cpp +++ b/src/core/GpgContext.cpp @@ -77,6 +77,14 @@ GpgContext::GpgContext(const GpgContextInitArgs &args) : args_(args) { assert(check_gpg_error_2_err_code(err) == GPG_ERR_NO_ERROR); } + if (args.custom_gpgconf && !args.custom_gpgconf_path.empty()) { + SPDLOG_DEBUG("set custom gpgconf path: {}", args.custom_gpgconf_path); + auto err = + gpgme_ctx_set_engine_info(_ctx_ref.get(), GPGME_PROTOCOL_GPGCONF, + args.custom_gpgconf_path.c_str(), nullptr); + assert(check_gpg_error_2_err_code(err) == GPG_ERR_NO_ERROR); + } + // set context offline mode SPDLOG_DEBUG("gpg context offline mode: {}", args_.offline_mode); gpgme_set_offline(_ctx_ref.get(), args_.offline_mode ? 1 : 0); |