https://bugs.documentfoundation.org/show_bug.cgi?id=160184

--- Comment #7 from Patrick Luby (volunteer) <[email protected]> ---
I found something in gpgme that will stop the failure to encrypt with public
keys with any Ownertrust value: set gpgme's "trust model" to "tofu" or
"always".   Both of these seem to ignore key validation completely so I doubt
that this is a good solution, but maybe some developers more familiar with
gpgme than me might know of an alternative gpgme option.

Debug patch that I used to set the trust model is below:

diff --git a/comphelper/source/misc/storagehelper.cxx
b/comphelper/source/misc/storagehelper.cxx
index 1d504cb91725..cca834dc94c6 100644
--- a/comphelper/source/misc/storagehelper.cxx
+++ b/comphelper/source/misc/storagehelper.cxx
@@ -480,6 +480,7 @@ uno::Sequence< beans::NamedValue >
OStorageHelper::CreateGpgPackageEncryptionDat
     if (ctx == nullptr)
         throw uno::RuntimeException("The GpgME library failed to initialize
for the OpenPGP protocol.");
     ctx->setArmor(false);
+    ctx->setFlag("trust-model", "tofu");

     for (const auto & cert : xSignCertificates)
     {

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to