1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-07-01 02:42:44 +02:00

* import.c (check_prefs): Some language fixes. (sec_to_pub_keyblock,

import_secret_one): Without knowing the number of MPIs there are, we
cannot try and sk-to-pk-ize a key.
This commit is contained in:
David Shaw 2004-02-14 01:54:12 +00:00
parent 35482c5ee5
commit f407bb6a97
2 changed files with 21 additions and 7 deletions

View File

@ -1,3 +1,9 @@
2004-02-13 David Shaw <dshaw@jabberwocky.com>
* import.c (check_prefs): Some language fixes.
(sec_to_pub_keyblock, import_secret_one): Without knowing the
number of MPIs there are, we cannot try and sk-to-pk-ize a key.
2004-02-12 David Shaw <dshaw@jabberwocky.com> 2004-02-12 David Shaw <dshaw@jabberwocky.com>
* import.c (check_prefs): New function to check preferences on a * import.c (check_prefs): New function to check preferences on a

View File

@ -608,10 +608,10 @@ check_prefs(KBNODE keyblock)
if(problem) if(problem)
{ {
log_info(_("It strongly suggested that you update" log_info(_("it is strongly suggested that you update"
" your preferences and re-distribute\n")); " your preferences and\n"));
log_info(_("this key to avoid potential algorithm" log_info(_("re-distribute this key to avoid potential algorithm"
" mismatch problems.\n")); " mismatch problems\n"));
if(!opt.batch) if(!opt.batch)
{ {
@ -956,7 +956,12 @@ sec_to_pub_keyblock(KBNODE sec_keyblock)
n=pubkey_get_npkey(pk->pubkey_algo); n=pubkey_get_npkey(pk->pubkey_algo);
if(n==0) if(n==0)
pk->pkey[0]=mpi_copy(sk->skey[0]); {
/* we can't properly extract the pubkey without knowing
the number of MPIs */
release_kbnode(pub_keyblock);
return NULL;
}
else else
{ {
int i; int i;
@ -1062,9 +1067,12 @@ import_secret_one( const char *fname, KBNODE keyblock,
/* Try and make a public key out of this. */ /* Try and make a public key out of this. */
KBNODE pub_keyblock=sec_to_pub_keyblock(keyblock); KBNODE pub_keyblock=sec_to_pub_keyblock(keyblock);
if(pub_keyblock)
{
import_one(fname,pub_keyblock,stats,opt.import_options); import_one(fname,pub_keyblock,stats,opt.import_options);
release_kbnode(pub_keyblock); release_kbnode(pub_keyblock);
} }
}
/* Now that the key is definitely incorporated into the keydb, /* Now that the key is definitely incorporated into the keydb,
if we have the public part of this key, we need to check if if we have the public part of this key, we need to check if