mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-24 10:39:57 +01:00
* keyedit.c (menu_adduid): 2440bis04 says that multiple attribute packets
on a given key are legal. * keyserver.c (keyserver_refresh): the fake v3 keyid hack applies to "mailto" URLs as well since they are also served by pksd.
This commit is contained in:
parent
4735060540
commit
66c8a663a5
@ -1,3 +1,11 @@
|
|||||||
|
2002-05-01 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
|
* keyedit.c (menu_adduid): 2440bis04 says that multiple attribute
|
||||||
|
packets on a given key are legal.
|
||||||
|
|
||||||
|
* keyserver.c (keyserver_refresh): the fake v3 keyid hack applies
|
||||||
|
to "mailto" URLs as well since they are also served by pksd.
|
||||||
|
|
||||||
2002-04-29 Werner Koch <wk@gnupg.org>
|
2002-04-29 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
Added a copyright year for files changed this year.
|
Added a copyright year for files changed this year.
|
||||||
|
@ -1641,45 +1641,21 @@ menu_adduid( KBNODE pub_keyblock, KBNODE sec_keyblock, int photo)
|
|||||||
assert(pk && sk);
|
assert(pk && sk);
|
||||||
|
|
||||||
if(photo) {
|
if(photo) {
|
||||||
int hasphoto=0;
|
int hasattrib=0;
|
||||||
|
|
||||||
/* PGP allows only one photo ID per key? This is a good
|
|
||||||
question. While there is no way to add more than one photo
|
|
||||||
ID using PGP, nevertheless PGP (7) still works properly with
|
|
||||||
more than one photo ID (presenting them in a nice little
|
|
||||||
scrolling window, no less). GnuPG can work with any number
|
|
||||||
of photos. -dms */
|
|
||||||
for( node = pub_keyblock; node; node = node->next )
|
for( node = pub_keyblock; node; node = node->next )
|
||||||
if( node->pkt->pkttype == PKT_USER_ID &&
|
if( node->pkt->pkttype == PKT_USER_ID &&
|
||||||
node->pkt->pkt.user_id->attrib_data!=NULL)
|
node->pkt->pkt.user_id->attrib_data!=NULL)
|
||||||
{
|
{
|
||||||
hasphoto=1;
|
hasattrib=1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if(opt.expert)
|
/* It is legal but bad for compatibility to add a photo ID to a
|
||||||
{
|
v3 key as it means that PGP2 will not be able to use that key
|
||||||
tty_printf(_("WARNING: This key already has a photo ID.\n"
|
anymore. Don't bother to ask this if the key already has a
|
||||||
" Adding another photo ID may confuse "
|
photo - any damage has already been done at that point. -dms */
|
||||||
"some versions of PGP.\n"));
|
if(pk->version==3 && !hasattrib)
|
||||||
if(!cpr_get_answer_is_yes("keyedit.multi_photo.okay",
|
|
||||||
_("Are you sure you still want "
|
|
||||||
"to add it? (y/N) ")))
|
|
||||||
return 0;
|
|
||||||
else
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
tty_printf(_("You may only have one photo ID on a key.\n"));
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Here's another one - PGP6/7 does not allow adding a photo ID
|
|
||||||
to a v3 key. Still, if one is present, it will work. Of
|
|
||||||
course, it does mean that PGP2 will not be able to use that
|
|
||||||
key anymore. Don't bother to ask this if the key already has
|
|
||||||
a photo - any damage has already been done at that point. */
|
|
||||||
if(pk->version==3 && !hasphoto)
|
|
||||||
{
|
{
|
||||||
if(opt.expert)
|
if(opt.expert)
|
||||||
{
|
{
|
||||||
|
@ -838,13 +838,14 @@ keyserver_refresh(STRLIST users)
|
|||||||
int rc,count,fakev3=0;
|
int rc,count,fakev3=0;
|
||||||
KEYDB_SEARCH_DESC *desc;
|
KEYDB_SEARCH_DESC *desc;
|
||||||
|
|
||||||
/* If refresh_add_fake_v3_keyids is on and it's a HKP scheme, then
|
/* If refresh_add_fake_v3_keyids is on and it's a HKP or MAILTO
|
||||||
enable fake v3 keyid generation. */
|
scheme, then enable fake v3 keyid generation. */
|
||||||
if(opt.keyserver_options.refresh_add_fake_v3_keyids &&
|
if(opt.keyserver_options.refresh_add_fake_v3_keyids &&
|
||||||
opt.keyserver_scheme &&
|
opt.keyserver_scheme &&
|
||||||
(strcasecmp(opt.keyserver_scheme,"x-hkp")==0 ||
|
(strcasecmp(opt.keyserver_scheme,"x-hkp")==0 ||
|
||||||
strcasecmp(opt.keyserver_scheme,"hkp")==0 ||
|
strcasecmp(opt.keyserver_scheme,"hkp")==0 ||
|
||||||
strcasecmp(opt.keyserver_scheme,"x-broken-hkp")==0))
|
strcasecmp(opt.keyserver_scheme,"x-broken-hkp")==0 ||
|
||||||
|
strcasecmp(opt.keyserver_scheme,"mailto")==0))
|
||||||
fakev3=1;
|
fakev3=1;
|
||||||
|
|
||||||
rc=keyidlist(users,&desc,&count,fakev3);
|
rc=keyidlist(users,&desc,&count,fakev3);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user