mirror of
git://git.gnupg.org/gnupg.git
synced 2025-03-28 22:49:59 +01:00
* keyedit.c (menu_set_keyserver_url): Confirm replacement of a keyserver
URL before overwriting the old one.
This commit is contained in:
parent
81e24105d0
commit
617a5a91bf
@ -1,3 +1,8 @@
|
|||||||
|
2004-09-16 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
|
* keyedit.c (menu_set_keyserver_url): Confirm replacement of a
|
||||||
|
keyserver URL before overwriting the old one.
|
||||||
|
|
||||||
2004-09-15 David Shaw <dshaw@jabberwocky.com>
|
2004-09-15 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
* gpgv.c (agent_scd_getattr): Stub.
|
* gpgv.c (agent_scd_getattr): Stub.
|
||||||
|
@ -3328,22 +3328,31 @@ menu_set_keyserver_url (const char *url,
|
|||||||
if ( keyid[0] == sig->keyid[0] && keyid[1] == sig->keyid[1]
|
if ( keyid[0] == sig->keyid[0] && keyid[1] == sig->keyid[1]
|
||||||
&& (uid && (sig->sig_class&~3) == 0x10) )
|
&& (uid && (sig->sig_class&~3) == 0x10) )
|
||||||
{
|
{
|
||||||
|
char *user=utf8_to_native(uid->name,strlen(uid->name),0);
|
||||||
if( sig->version < 4 )
|
if( sig->version < 4 )
|
||||||
{
|
log_info(_("skipping v3 self-signature on user id \"%s\"\n"),
|
||||||
char *user=utf8_to_native(uid->name,strlen(uid->name),0);
|
user);
|
||||||
|
|
||||||
log_info(_("skipping v3 self-signature on user id \"%s\"\n"),
|
|
||||||
user);
|
|
||||||
m_free(user);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* This is a selfsignature which is to be replaced
|
/* This is a selfsignature which is to be replaced
|
||||||
* We have to ignore v3 signatures because they are
|
* We have to ignore v3 signatures because they are
|
||||||
* not able to carry the preferences */
|
* not able to carry the subpacket. */
|
||||||
PKT_signature *newsig;
|
PKT_signature *newsig;
|
||||||
PACKET *newpkt;
|
PACKET *newpkt;
|
||||||
int rc;
|
int rc;
|
||||||
|
const byte *p;
|
||||||
|
size_t plen;
|
||||||
|
|
||||||
|
p=parse_sig_subpkt(sig->hashed,SIGSUBPKT_PREF_KS,&plen);
|
||||||
|
if(p && plen)
|
||||||
|
{
|
||||||
|
tty_printf("Current preferred keyserver for user"
|
||||||
|
" ID \"%s\": %.*s\n",user,plen,p);
|
||||||
|
if(!cpr_get_answer_is_yes("keyedit.confirm_keyserver",
|
||||||
|
_("Are you sure you want"
|
||||||
|
" to replace it? (y/N) ")))
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
rc = update_keysig_packet (&newsig, sig,
|
rc = update_keysig_packet (&newsig, sig,
|
||||||
main_pk, uid, NULL,
|
main_pk, uid, NULL,
|
||||||
@ -3367,6 +3376,8 @@ menu_set_keyserver_url (const char *url,
|
|||||||
node->pkt = newpkt;
|
node->pkt = newpkt;
|
||||||
modified = 1;
|
modified = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_free(user);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user