1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-01-21 14:47:03 +01:00

* delkey.c, export.c, keyedit.c, pkclist.c, revoke.c, skclist.c: Fix a few

missed possible \"username\" quotes.
This commit is contained in:
David Shaw 2004-10-28 01:58:01 +00:00
parent e216c20f40
commit 1976afce93
7 changed files with 48 additions and 33 deletions

View File

@ -1,3 +1,8 @@
2004-10-27 David Shaw <dshaw@jabberwocky.com>
* delkey.c, export.c, keyedit.c, pkclist.c, revoke.c, skclist.c:
Fix a few missed possible \"username\" quotes.
2004-10-26 Werner Koch <wk@g10code.com>
* app-openpgp.c (verify_chv3): The minimum length for CHV3 is

View File

@ -71,7 +71,7 @@ do_delete_key( const char *username, int secret, int *r_sec_avail )
|| desc.mode == KEYDB_SEARCH_MODE_FPR20);
rc = desc.mode? keydb_search (hd, &desc, 1):G10ERR_INV_USER_ID;
if (rc) {
log_error (_("key `%s' not found: %s\n"), username, g10_errstr (rc));
log_error (_("key \"%s\" not found: %s\n"), username, g10_errstr (rc));
write_status_text( STATUS_DELETE_PROBLEM, "1" );
goto leave;
}

View File

@ -159,7 +159,7 @@ do_export_stream( IOBUF out, STRLIST users, int secret,
if (classify_user_id (sl->d, desc+ndesc))
ndesc++;
else
log_error (_("key `%s' not found: %s\n"),
log_error (_("key \"%s\" not found: %s\n"),
sl->d, g10_errstr (G10ERR_INV_USER_ID));
}

View File

@ -1338,18 +1338,21 @@ keyedit_menu( const char *username, STRLIST locusr,
afp[an++] = 0;
rc = keydb_search_fpr (sec_kdbhd, afp);
}
if (!rc) {
if (!rc)
{
rc = keydb_get_keyblock (sec_kdbhd, &sec_keyblock);
if (rc) {
log_error (_("error reading secret keyblock `%s': %s\n"),
username, g10_errstr(rc));
}
else {
if (rc)
{
log_error (_("error reading secret keyblock \"%s\": %s\n"),
username, g10_errstr(rc));
}
else
{
merge_keys_and_selfsig( sec_keyblock );
if( fix_keyblock( sec_keyblock ) )
sec_modified++;
}
}
sec_modified++;
}
}
if (rc) {
sec_keyblock = NULL;
@ -2914,7 +2917,7 @@ menu_addrevoker( KBNODE pub_keyblock, KBNODE sec_keyblock, int sensitive )
rc=get_pubkey_byname(revoker_pk,answer,NULL,NULL,1);
if(rc)
{
log_error (_("key `%s' not found: %s\n"),answer,g10_errstr(rc));
log_error (_("key \"%s\" not found: %s\n"),answer,g10_errstr(rc));
m_free(answer);
continue;
}

View File

@ -900,7 +900,7 @@ build_pk_list( STRLIST rcpts, PK_LIST *ret_pk_list, unsigned use )
/* The default recipient may be disabled */
rc = get_pubkey_byname( pk, def_rec, NULL, NULL, 1 );
if( rc )
log_error(_("unknown default recipient `%s'\n"), def_rec );
log_error(_("unknown default recipient \"%s\"\n"), def_rec );
else if( !(rc=check_pubkey_algo2(pk->pubkey_algo, use)) ) {
/* Mark any_recipients here since the default recipient
would have been used if it wasn't already there. It

View File

@ -222,7 +222,7 @@ gen_desig_revoke( const char *uname )
classify_user_id (uname, &desc);
rc = desc.mode? keydb_search (kdbhd, &desc, 1) : G10ERR_INV_USER_ID;
if (rc) {
log_error (_("key `%s' not found: %s\n"),uname, g10_errstr (rc));
log_error (_("key \"%s\" not found: %s\n"),uname, g10_errstr (rc));
goto leave;
}
@ -372,7 +372,7 @@ gen_desig_revoke( const char *uname )
}
if(!any)
log_error(_("no revocation keys found for `%s'\n"),uname);
log_error(_("no revocation keys found for \"%s\"\n"),uname);
leave:
if( pk )
@ -425,11 +425,12 @@ gen_revoke( const char *uname )
kdbhd = keydb_new (1);
classify_user_id (uname, &desc);
rc = desc.mode? keydb_search (kdbhd, &desc, 1) : G10ERR_INV_USER_ID;
if (rc) {
log_error (_("secret key `%s' not found: %s\n"),
if (rc)
{
log_error (_("secret key \"%s\" not found: %s\n"),
uname, g10_errstr (rc));
goto leave;
}
}
rc = keydb_get_keyblock (kdbhd, &keyblock );
if( rc ) {

View File

@ -153,34 +153,40 @@ build_sk_list( STRLIST locusr, SK_LIST *ret_sk_list,
* won't catch all duplicates because the user IDs may be
* specified in different ways.
*/
if ( is_duplicated_entry ( locusr_orig, locusr ) ) {
log_error(_("skipped `%s': duplicated\n"), locusr->d );
if ( is_duplicated_entry ( locusr_orig, locusr ) )
{
log_error(_("skipped \"%s\": duplicated\n"), locusr->d );
continue;
}
}
sk = m_alloc_clear( sizeof *sk );
sk->req_usage = use;
if( (rc = get_seckey_byname( sk, locusr->d, 0 )) ) {
if( (rc = get_seckey_byname( sk, locusr->d, 0 )) )
{
free_secret_key( sk ); sk = NULL;
log_error(_("skipped `%s': %s\n"), locusr->d, g10_errstr(rc) );
}
log_error(_("skipped \"%s\": %s\n"),
locusr->d, g10_errstr(rc) );
}
else if ( key_present_in_sk_list(sk_list, sk) == 0) {
free_secret_key(sk); sk = NULL;
log_info(_("skipped: secret key already present\n"));
}
else if ( unlock && (rc = check_secret_key( sk, 0 )) ) {
else if ( unlock && (rc = check_secret_key( sk, 0 )) )
{
free_secret_key( sk ); sk = NULL;
log_error(_("skipped `%s': %s\n"), locusr->d, g10_errstr(rc) );
}
log_error(_("skipped \"%s\": %s\n"),
locusr->d, g10_errstr(rc) );
}
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(_("skipped `%s': this is a PGP generated "
"Elgamal key which is not secure for signatures!\n"),
locusr->d );
&& sk->pubkey_algo == PUBKEY_ALGO_ELGAMAL_E )
{
log_info(_("skipped \"%s\": %s\n"),locusr->d,
_("this is a PGP generated Elgamal key which"
" is not secure for signatures!"));
free_secret_key( sk ); sk = NULL;
}
}
else if( random_is_faked() && !is_insecure( sk ) ) {
log_info(_("key is not flagged as insecure - "
"can't use it with the faked RNG!\n"));
@ -196,7 +202,7 @@ build_sk_list( STRLIST locusr, SK_LIST *ret_sk_list,
}
else {
free_secret_key( sk ); sk = NULL;
log_error("skipped `%s': %s\n", locusr->d, g10_errstr(rc) );
log_error("skipped \"%s\": %s\n", locusr->d, g10_errstr(rc) );
}
}
}