Re: [gmime-devel] Using GMimeDecryptResult - certificate information?



Daniel Kahn Gillmor writes on juli 12, 2016 22:26:
On Tue 2016-07-12 18:11:55 +0200, Gaute Hope wrote:
I am trying to use GMime's GPG support. I can encrypt, decrypt and
verify fine - but when I try to use the GMimeDecryptResult certificates
to get a list of the recipients for the encrypted message, all fields
but the 'keyid' are 0x0. Are these here only for convenience or how do I
get them to load the rest of the key information?

That implies that GnuPG doesn't have a copy of the signer's certificate.
If you set $KEYID to the hex version of the keyid you discovered, and
then do:

  gpg --keyserver pool.sks-keyservers.net --recv 0x$KEYID

then retry GMime on the message in question, you should get much more
information about the key.

Thanks Daniel,

 I do have the keys locally though (I have them lsigned as well since
I use them as recipients for encrypted messages), it does not work when
I encrypt for myself.

The KEYID shown is the subkey for encryption ('E'). When accessing
signatures through GMime the key information is loaded (as long as I
have the key of course), signatures are done with the master key.

I am confused to why the rest of the information associated with the
master key is not loaded for the subkey though, is there any way to load
the master key in gmime?

I have experimented with setting: always_trust (true) and import_keys
(true) on the gpg context without any change.


 - gaute


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]