mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
Fix bug#1307.
This commit is contained in:
parent
344d72b2f7
commit
18936a1970
6 changed files with 35 additions and 17 deletions
|
@ -1,3 +1,14 @@
|
|||
2011-01-10 Werner Koch <wk@g10code.com>
|
||||
|
||||
* keygen.c (ask_user_id): Fix duplicate test for AMAIL by correct
|
||||
ANAME. See bug#1307. Reported by Steve Grubb.
|
||||
|
||||
* import.c (import_keys_internal): Make loop code a bit more
|
||||
readable. See bug#1307. Reported by Steve Grubb.
|
||||
|
||||
* sign.c (sign_file): Fix TEMP_HASHLEN computation. See bug#1307.
|
||||
Reported by Steve Grubb.
|
||||
|
||||
2010-10-29 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* pkclist.c (select_algo_from_prefs): Make sure the scores can't
|
||||
|
|
|
@ -175,10 +175,9 @@ import_keys_internal( IOBUF inp, char **fnames, int nnames,
|
|||
rc = import( inp, "[stream]", stats, fpr, fpr_len, options);
|
||||
}
|
||||
else {
|
||||
if( !fnames && !nnames )
|
||||
nnames = 1; /* Ohh what a ugly hack to jump into the loop */
|
||||
int once = (!fnames && !nnames);
|
||||
|
||||
for(i=0; i < nnames; i++ ) {
|
||||
for(i=0; once || i < nnames; once=0, i++ ) {
|
||||
const char *fname = fnames? fnames[i] : NULL;
|
||||
IOBUF inp2 = iobuf_open(fname);
|
||||
if( !fname )
|
||||
|
@ -201,8 +200,6 @@ import_keys_internal( IOBUF inp, char **fnames, int nnames,
|
|||
log_error("import from `%s' failed: %s\n", fname,
|
||||
g10_errstr(rc) );
|
||||
}
|
||||
if( !fname )
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!stats_handle) {
|
||||
|
|
|
@ -2247,7 +2247,7 @@ ask_user_id (int mode, KBNODE keyblock)
|
|||
xfree(answer);
|
||||
}
|
||||
xfree(answer);
|
||||
if( !amail && !acomment && !amail )
|
||||
if( !aname && !acomment && !amail )
|
||||
break;
|
||||
xfree(uid); uid = NULL;
|
||||
}
|
||||
|
|
|
@ -867,8 +867,8 @@ sign_file( strlist_t filenames, int detached, strlist_t locusr,
|
|||
{
|
||||
if (sk_rover->sk->pubkey_algo == PUBKEY_ALGO_DSA)
|
||||
{
|
||||
int temp_hashlen = gcry_mpi_get_nbits
|
||||
(sk_rover->sk->skey[1])+7/8;
|
||||
int temp_hashlen = (gcry_mpi_get_nbits
|
||||
(sk_rover->sk->skey[1])+7)/8;
|
||||
|
||||
/* Pick a hash that is large enough for our
|
||||
largest q */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue