mirror of
git://git.gnupg.org/gnupg.git
synced 2024-11-10 21:38:50 +01:00
* getkey.c (parse_auto_key_locate): Fix dupe-removal code.
* keyedit.c (menu_backsign): Allow backsigning even if the secret subkey doesn't have a binding signature. * armor.c (radix64_read): Don't report EOF when reading only a pad (=) character. The EOF actually starts after the pad. * gpg.c (main): Make --export, --send-keys, --recv-keys, --refresh-keys, and --fetch-keys follow their arguments from left to right. Suggested by Peter Palfrader.
This commit is contained in:
parent
4fdc6387c3
commit
51e88a5fdb
@ -1,3 +1,17 @@
|
|||||||
|
2006-04-08 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
|
* getkey.c (parse_auto_key_locate): Fix dupe-removal code.
|
||||||
|
|
||||||
|
* keyedit.c (menu_backsign): Allow backsigning even if the secret
|
||||||
|
subkey doesn't have a binding signature.
|
||||||
|
|
||||||
|
* armor.c (radix64_read): Don't report EOF when reading only a pad
|
||||||
|
(=) character. The EOF actually starts after the pad.
|
||||||
|
|
||||||
|
* gpg.c (main): Make --export, --send-keys, --recv-keys,
|
||||||
|
--refresh-keys, and --fetch-keys follow their arguments from left
|
||||||
|
to right. Suggested by Peter Palfrader.
|
||||||
|
|
||||||
2006-04-08 Werner Koch <wk@g10code.com>
|
2006-04-08 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
* mainproc.c (list_node): Print ring trust value only if not empty
|
* mainproc.c (list_node): Print ring trust value only if not empty
|
||||||
@ -7,7 +21,7 @@
|
|||||||
|
|
||||||
* getkey.c (user_id_not_found_utf8): New.
|
* getkey.c (user_id_not_found_utf8): New.
|
||||||
(get_primary_uid, get_user_id): Use it. Fixes Debian bug #205028
|
(get_primary_uid, get_user_id): Use it. Fixes Debian bug #205028
|
||||||
inthe right way.
|
in the right way.
|
||||||
|
|
||||||
2006-04-03 Werner Koch <wk@g10code.com>
|
2006-04-03 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
|
@ -676,7 +676,7 @@ radix64_read( armor_filter_context_t *afx, IOBUF a, size_t *retn,
|
|||||||
int checkcrc=0;
|
int checkcrc=0;
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
size_t n = 0;
|
size_t n = 0;
|
||||||
int idx, i;
|
int idx, i, onlypad=0;
|
||||||
u32 crc;
|
u32 crc;
|
||||||
|
|
||||||
crc = afx->crc;
|
crc = afx->crc;
|
||||||
@ -720,6 +720,8 @@ radix64_read( armor_filter_context_t *afx, IOBUF a, size_t *retn,
|
|||||||
goto again;
|
goto again;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if(n==0)
|
||||||
|
onlypad=1;
|
||||||
|
|
||||||
if( idx == 1 )
|
if( idx == 1 )
|
||||||
buf[n++] = val;
|
buf[n++] = val;
|
||||||
@ -848,7 +850,7 @@ radix64_read( armor_filter_context_t *afx, IOBUF a, size_t *retn,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !n )
|
if( !n && !onlypad )
|
||||||
rc = -1;
|
rc = -1;
|
||||||
|
|
||||||
*retn = n;
|
*retn = n;
|
||||||
|
@ -2947,7 +2947,7 @@ parse_auto_key_locate(char *options)
|
|||||||
|
|
||||||
while((tok=optsep(&options)))
|
while((tok=optsep(&options)))
|
||||||
{
|
{
|
||||||
struct akl *akl,*last;
|
struct akl *akl,*check,*last=NULL;
|
||||||
int dupe=0;
|
int dupe=0;
|
||||||
|
|
||||||
if(tok[0]=='\0')
|
if(tok[0]=='\0')
|
||||||
@ -2976,13 +2976,13 @@ parse_auto_key_locate(char *options)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* We must maintain the order the user gave us */
|
/* We must maintain the order the user gave us */
|
||||||
for(last=opt.auto_key_locate;last && last->next;last=last->next)
|
for(check=opt.auto_key_locate;check;last=check,check=check->next)
|
||||||
{
|
{
|
||||||
/* Check for duplicates */
|
/* Check for duplicates */
|
||||||
if(last && last->type==akl->type
|
if(check->type==akl->type
|
||||||
&& (akl->type!=AKL_SPEC
|
&& (akl->type!=AKL_SPEC
|
||||||
|| (akl->type==AKL_SPEC
|
|| (akl->type==AKL_SPEC
|
||||||
&& strcmp(last->spec->uri,akl->spec->uri)==0)))
|
&& strcmp(check->spec->uri,akl->spec->uri)==0)))
|
||||||
{
|
{
|
||||||
dupe=1;
|
dupe=1;
|
||||||
free_akl(akl);
|
free_akl(akl);
|
||||||
|
11
g10/gpg.c
11
g10/gpg.c
@ -3399,12 +3399,17 @@ main (int argc, char **argv )
|
|||||||
import_keys( argc? argv:NULL, argc, NULL, opt.import_options );
|
import_keys( argc? argv:NULL, argc, NULL, opt.import_options );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
/* TODO: There are a number of command that use this same
|
||||||
|
"make strlist, call function, report error, free strlist"
|
||||||
|
pattern. Join them together here and avoid all that
|
||||||
|
duplicated code. */
|
||||||
|
|
||||||
case aExport:
|
case aExport:
|
||||||
case aSendKeys:
|
case aSendKeys:
|
||||||
case aRecvKeys:
|
case aRecvKeys:
|
||||||
sl = NULL;
|
sl = NULL;
|
||||||
for( ; argc; argc--, argv++ )
|
for( ; argc; argc--, argv++ )
|
||||||
add_to_strlist2( &sl, *argv, utf8_strings );
|
append_to_strlist2( &sl, *argv, utf8_strings );
|
||||||
if( cmd == aSendKeys )
|
if( cmd == aSendKeys )
|
||||||
rc=keyserver_export( sl );
|
rc=keyserver_export( sl );
|
||||||
else if( cmd == aRecvKeys )
|
else if( cmd == aRecvKeys )
|
||||||
@ -3436,7 +3441,7 @@ main (int argc, char **argv )
|
|||||||
case aRefreshKeys:
|
case aRefreshKeys:
|
||||||
sl = NULL;
|
sl = NULL;
|
||||||
for( ; argc; argc--, argv++ )
|
for( ; argc; argc--, argv++ )
|
||||||
add_to_strlist2( &sl, *argv, utf8_strings );
|
append_to_strlist2( &sl, *argv, utf8_strings );
|
||||||
rc=keyserver_refresh(sl);
|
rc=keyserver_refresh(sl);
|
||||||
if(rc)
|
if(rc)
|
||||||
log_error(_("keyserver refresh failed: %s\n"),g10_errstr(rc));
|
log_error(_("keyserver refresh failed: %s\n"),g10_errstr(rc));
|
||||||
@ -3446,7 +3451,7 @@ main (int argc, char **argv )
|
|||||||
case aFetchKeys:
|
case aFetchKeys:
|
||||||
sl = NULL;
|
sl = NULL;
|
||||||
for( ; argc; argc--, argv++ )
|
for( ; argc; argc--, argv++ )
|
||||||
add_to_strlist2( &sl, *argv, utf8_strings );
|
append_to_strlist2( &sl, *argv, utf8_strings );
|
||||||
rc=keyserver_fetch(sl);
|
rc=keyserver_fetch(sl);
|
||||||
if(rc)
|
if(rc)
|
||||||
log_error("key fetch failed: %s\n",g10_errstr(rc));
|
log_error("key fetch failed: %s\n",g10_errstr(rc));
|
||||||
|
@ -3711,9 +3711,6 @@ menu_backsign(KBNODE pub_keyblock,KBNODE sec_keyblock)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!sig_sk)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
/* Now we can get to work. We have a main key and secret part,
|
/* Now we can get to work. We have a main key and secret part,
|
||||||
a signing subkey with signature and secret part with
|
a signing subkey with signature and secret part with
|
||||||
signature. */
|
signature. */
|
||||||
@ -3744,6 +3741,8 @@ menu_backsign(KBNODE pub_keyblock,KBNODE sec_keyblock)
|
|||||||
xfree(sig_pk->pkt);
|
xfree(sig_pk->pkt);
|
||||||
sig_pk->pkt=newpkt;
|
sig_pk->pkt=newpkt;
|
||||||
|
|
||||||
|
if(sig_sk)
|
||||||
|
{
|
||||||
/* Put the new sig into place on the seckey */
|
/* Put the new sig into place on the seckey */
|
||||||
newpkt=xmalloc_clear(sizeof(*newpkt));
|
newpkt=xmalloc_clear(sizeof(*newpkt));
|
||||||
newpkt->pkttype=PKT_SIGNATURE;
|
newpkt->pkttype=PKT_SIGNATURE;
|
||||||
@ -3751,6 +3750,7 @@ menu_backsign(KBNODE pub_keyblock,KBNODE sec_keyblock)
|
|||||||
free_packet(sig_sk->pkt);
|
free_packet(sig_sk->pkt);
|
||||||
xfree(sig_sk->pkt);
|
xfree(sig_sk->pkt);
|
||||||
sig_sk->pkt=newpkt;
|
sig_sk->pkt=newpkt;
|
||||||
|
}
|
||||||
|
|
||||||
modified=1;
|
modified=1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user