1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

* skclist.c (build_sk_list): Don't need to warn about PGP-generated

Elgamal signing keys since we no longer support any Elgamal signing keys.

* sign.c (sign_file, clearsign_file): Use "writing to" instead of "writing
to file" to match other strings.

* pkclist.c (check_signatures_trust): Fix typo.  Noted by Moray Allan.
This is Debian bug #278708.

* passphrase.c (ask_passphrase, passphrase_to_dek): "password" ->
"passphrase".

* keyedit.c (show_key_with_all_names): Show designated revoker as part of
translatable string.
This commit is contained in:
David Shaw 2004-10-28 22:09:09 +00:00
parent 0934d10e0f
commit 6ab8378c00
6 changed files with 77 additions and 51 deletions

View File

@ -1,3 +1,21 @@
2004-10-28 David Shaw <dshaw@jabberwocky.com>
* skclist.c (build_sk_list): Don't need to warn about
PGP-generated Elgamal signing keys since we no longer support any
Elgamal signing keys.
* sign.c (sign_file, clearsign_file): Use "writing to" instead of
"writing to file" to match other strings.
* pkclist.c (check_signatures_trust): Fix typo. Noted by Moray
Allan. This is Debian bug #278708.
* passphrase.c (ask_passphrase, passphrase_to_dek): "password" ->
"passphrase".
* keyedit.c (show_key_with_all_names): Show designated revoker as
part of translatable string.
2004-10-28 Werner Koch <wk@g10code.com>
* Makefile.am (other_libs): New. Also include LIBICONV. Noted by

View File

@ -2226,11 +2226,13 @@ show_key_with_all_names( KBNODE keyblock, int only_marked, int with_revoker,
primary=pk;
}
if(with_revoker) {
if(with_revoker)
{
if( !pk->revkey && pk->numrevkeys )
BUG();
else
for(i=0;i<pk->numrevkeys;i++) {
for(i=0;i<pk->numrevkeys;i++)
{
u32 r_keyid[2];
char *user;
const char *algo=
@ -2239,12 +2241,16 @@ show_key_with_all_names( KBNODE keyblock, int only_marked, int with_revoker,
keyid_from_fingerprint(pk->revkey[i].fpr,
MAX_FINGERPRINT_LEN,r_keyid);
user=get_user_id_string (r_keyid);
tty_printf (_("This key may be revoked by %s key "),
algo?algo:"?");
tty_print_utf8_string (user, strlen (user));
if ((pk->revkey[i].class&0x40))
user=get_user_id_string_native(r_keyid);
tty_printf(_("This key may be revoked by %s key %s"),
algo?algo:"?",user);
if(pk->revkey[i].class&0x40)
{
tty_printf(" ");
tty_printf(_("(sensitive)"));
}
tty_printf ("\n");
m_free(user);
}

View File

@ -1050,7 +1050,7 @@ ask_passphrase (const char *description,
}
else if (opt.batch)
{
log_error(_("can't query password in batch mode\n"));
log_error(_("can't query passphrase in batch mode\n"));
pw = NULL;
}
else {
@ -1207,8 +1207,9 @@ passphrase_to_dek( u32 *keyid, int pubkey_algo,
pw = m_alloc_secure( strlen(fd_passwd)+1 );
strcpy( pw, fd_passwd );
}
else if( opt.batch ) {
log_error(_("can't query password in batch mode\n"));
else if( opt.batch )
{
log_error(_("can't query passphrase in batch mode\n"));
pw = m_strdup( "" ); /* return an empty passphrase */
}
else {

View File

@ -518,7 +518,7 @@ check_signatures_trust( PKT_signature *sig )
" designated revoker!\n"));
else
log_info(_("WARNING: This key has been revoked by its owner!\n"));
log_info(_(" This could mean that the signature is forgery.\n"));
log_info(_(" This could mean that the signature is forged.\n"));
show_revocation_reason( pk, 0 );
}
else if ((trustlevel & TRUST_FLAG_SUB_REVOKED) )

View File

@ -774,13 +774,14 @@ sign_file( STRLIST filenames, int detached, STRLIST locusr,
}
else
out = iobuf_create( outfile );
if( !out ) {
if( !out )
{
log_error(_("can't create `%s': %s\n"), outfile, strerror(errno) );
rc = G10ERR_CREATE_FILE;
goto leave;
}
else if( opt.verbose )
log_info(_("writing to file `%s'\n"), outfile );
log_info(_("writing to `%s'\n"), outfile );
}
else if( (rc = open_outfile( fname, opt.armor? 1: detached? 2:0, &out )))
goto leave;
@ -1031,13 +1032,14 @@ clearsign_file( const char *fname, STRLIST locusr, const char *outfile )
}
else
out = iobuf_create( outfile );
if( !out ) {
if( !out )
{
log_error(_("can't create `%s': %s\n"), outfile, strerror(errno) );
rc = G10ERR_CREATE_FILE;
goto leave;
}
else if( opt.verbose )
log_info(_("writing to file `%s'\n"), outfile );
log_info(_("writing to `%s'\n"), outfile );
}
else if( (rc = open_outfile( fname, 1, &out )) )
goto leave;

View File

@ -107,7 +107,8 @@ build_sk_list( STRLIST locusr, SK_LIST *ret_sk_list,
SK_LIST sk_list = NULL;
int rc;
if( !locusr ) { /* use the default one */
if( !locusr )
{ /* use the default one */
PKT_secret_key *sk;
sk = m_alloc_clear( sizeof *sk );
@ -116,21 +117,18 @@ build_sk_list( STRLIST locusr, SK_LIST *ret_sk_list,
free_secret_key( sk ); sk = NULL;
log_error("no default secret key: %s\n", g10_errstr(rc) );
}
else if( !(rc=check_pubkey_algo2(sk->pubkey_algo, use)) ) {
else if( !(rc=check_pubkey_algo2(sk->pubkey_algo, use)) )
{
SK_LIST r;
if( sk->version == 4 && (use & PUBKEY_USAGE_SIG)
&& sk->pubkey_algo == PUBKEY_ALGO_ELGAMAL_E ) {
log_info("this is a PGP generated "
"Elgamal key which is NOT secure for signatures!\n");
free_secret_key( sk ); sk = NULL;
}
else if( random_is_faked() && !is_insecure( sk ) ) {
if( random_is_faked() && !is_insecure( sk ) )
{
log_info(_("key is not flagged as insecure - "
"can't use it with the faked RNG!\n"));
free_secret_key( sk ); sk = NULL;
}
else {
else
{
r = m_alloc( sizeof *r );
r->sk = sk; sk = NULL;
r->next = sk_list;
@ -138,7 +136,8 @@ build_sk_list( STRLIST locusr, SK_LIST *ret_sk_list,
sk_list = r;
}
}
else {
else
{
free_secret_key( sk ); sk = NULL;
log_error("invalid default secret key: %s\n", g10_errstr(rc) );
}