I'm keeping the threading, but dropping the context. I think I found
a clue here to why gpg signing is broken.
The call to message_add_signed_part in pan/usenet-utils/mime-utils.cc
fails on one of the gmime calls because gpg_ctx (defined as "
GMimeCryptoContext *gpg_ctx;" in gpg.cc in the same directory is NOT
a gmime crypto context.
In terms of why that is the case, gpg_ctx seems to appear only in
those two files (gpg.cc and mime-utils.cc, and their .h files.) At
the very end of gpg.cc, there is:
void init_gpg()
{
// gpg_ctx = g_mime_gpg_context_new (request_passwd, "gpg2");
if (!gpg_ctx) gpg_inited = false; else gpg_inited = true;
//
g_mime_gpg_context_set_auto_key_retrieve(GMIME_GPG_CONTEXT(gpg_ctx),true);
//
g_mime_gpg_context_set_always_trust(GMIME_GPG_CONTEXT(gpg_ctx),false);
// g_mime_gpg_context_set_use_agent(GMIME_GPG_CONTEXT(gpg_ctx),
false);
}
which looks to me like nobody actually ever figured out how to make
this work, and commented out older attempts. (No, I have not yet
gone through git logs to see the actual history of this file.) I
see that the second line tests for gpg_ctx, but the only place it
ever gets set is the commented out first line, so it can't possibly
succeed. This is clearly going to take a good bit more digging - and
I just hope the presence of "gpg2" is for gnupg version 2, and
doesn't reflect on the gmime2 -> gmime3 migration.
Jack