Created
June 23, 2016 15:49
-
-
Save joostrijneveld/33819df96fdab98ecc7bd275ee79e15e to your computer and use it in GitHub Desktop.
Editing GPG's keyedit.c to allow unsigned UIDs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/g10/keyedit.c | |
+++ b/g10/keyedit.c | |
@@ -1877,7 +1877,7 @@ static struct | |
{ "nrsign", cmdNOP, 0, | |
N_("sign selected user IDs with a non-revocable signature")}, | |
{ "debug", cmdDEBUG, 0, NULL}, | |
- { "adduid", cmdADDUID, KEYEDIT_NOT_SK | KEYEDIT_NEED_SK, N_("add a user ID")}, | |
+ { "adduid", cmdADDUID, KEYEDIT_NOT_SK, N_("add a user ID")}, | |
{ "addphoto", cmdADDPHOTO, KEYEDIT_NOT_SK | KEYEDIT_NEED_SK, | |
N_("add a photo ID")}, | |
{ "deluid", cmdDELUID, KEYEDIT_NOT_SK, N_("delete selected user IDs")}, | |
@@ -4205,16 +4205,6 @@ menu_adduid (ctrl_t ctrl, kbnode_t pub_keyblock, | |
return 0; | |
} | |
- err = make_keysig_packet (&sig, pk, uid, NULL, pk, 0x13, 0, 0, 0, | |
- keygen_add_std_prefs, pk, NULL); | |
- if (err) | |
- { | |
- write_status_error ("keysig", err); | |
- log_error ("signing failed: %s\n", gpg_strerror (err)); | |
- free_user_id (uid); | |
- return 0; | |
- } | |
- | |
/* Insert/append to public keyblock */ | |
pkt = xmalloc_clear (sizeof *pkt); | |
pkt->pkttype = PKT_USER_ID; | |
@@ -4224,13 +4214,6 @@ menu_adduid (ctrl_t ctrl, kbnode_t pub_keyblock, | |
insert_kbnode (pub_where, node, 0); | |
else | |
add_kbnode (pub_keyblock, node); | |
- pkt = xmalloc_clear (sizeof *pkt); | |
- pkt->pkttype = PKT_SIGNATURE; | |
- pkt->pkt.signature = copy_signature (NULL, sig); | |
- if (pub_where) | |
- insert_kbnode (node, new_kbnode (pkt), 0); | |
- else | |
- add_kbnode (pub_keyblock, new_kbnode (pkt)); | |
return 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment