Page MenuHome GnuPG

GpgOL: Lower security level displayed for pgp keys with revoked userid
Open, NormalPublic

Description

If an ultimately trusted pgp certificate has a revoked userid, signed mails will display the security level 2 instead of 4.

To reproduce:

  1. Create a mail with security level 4 (e.g. from edward to ted with default test certs)
  2. Make sure, security level 4 is displayed in Outlook
  3. Add and revoke a userid on the signing cert (e.g. to edwards cert)
  4. Select the mail in Outlook -> security level 2 is displayed

gpgol.log (preview mail):

Details

Version
vsd-3.3.3 @ win10

Event Timeline

timegrid created this object with edit policy "Contributor (Project)".

Do you mean one of the user-ids has been revoked or the one matching the mail sender?

I rechecked: the revoked userid has to match the email address of the sender. Still there's another non revoked userid with the same email address:

werner added a project: Bug Report.

Good catch. My guess is that get_uid_for_sender returns the last matching UID without checking for revocations. The matching was done on the mailbox part only. For reference:

for (const auto &uid: k.userIDs())
  {
    if (!uid.email() || !*(uid.email()))
      {
        /* This happens for S/MIME a lot */
        log_debug ("%s:%s: skipping uid without email.",
                   SRCNAME, __func__);
        continue;
      }
    auto normalized_uid = uid.addrSpec();
    auto normalized_sender = UserID::addrSpecFromString(sender);

    if (normalized_sender.empty() || normalized_uid.empty())
      {
        log_error ("%s:%s: normalizing '%s' or '%s' failed.",
                   SRCNAME, __func__, anonstr (uid.email()),
                   anonstr (sender));
        continue;
      }
    if (normalized_sender == normalized_uid)
      {
        ret = uid;
      }
  }
 TRETURN ret;