diff options
Diffstat (limited to 'g10/sign.c')
-rw-r--r-- | g10/sign.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/g10/sign.c b/g10/sign.c index 833b6ef06..a4974be85 100644 --- a/g10/sign.c +++ b/g10/sign.c @@ -40,7 +40,7 @@ #include "pkglue.h" #include "sysutils.h" #include "call-agent.h" - +#include "mbox-util.h" #ifdef HAVE_DOSISH_SYSTEM #define LF "\r\n" @@ -144,6 +144,20 @@ mk_notation_policy_etc (PKT_signature *sig, p, strlen (p)); xfree (p); } + + /* Set signer's user id. */ + if (IS_SIG (sig) && !opt.flags.disable_signer_uid) + { + char *mbox; + + /* For now we use the uid which was used to locate the key. */ + if (pksk->user_id && (mbox = mailbox_from_userid (pksk->user_id->name))) + { + if (DBG_LOOKUP) + log_debug ("setting Signer's UID to '%s'\n", mbox); + build_sig_subpkt (sig, SIGSUBPKT_SIGNERS_UID, mbox, strlen (mbox)); + } + } } |