mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-23 10:29:58 +01:00
* card-util.c, delkey.c, keygen.c, plaintext.c, keyedit.c, passphrase.c,
revoke.c: Collapse the two different "can't do that in batch mode" strings into one.
This commit is contained in:
parent
f5b7a72a48
commit
f15e944b98
@ -1,5 +1,9 @@
|
|||||||
2004-10-27 David Shaw <dshaw@jabberwocky.com>
|
2004-10-27 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
|
* card-util.c, delkey.c, keygen.c, plaintext.c, keyedit.c,
|
||||||
|
passphrase.c, revoke.c: Collapse the two different "can't do that
|
||||||
|
in batch mode" strings into one.
|
||||||
|
|
||||||
* keylist.c (status_one_subpacket): New. Send the subpacket data
|
* keylist.c (status_one_subpacket): New. Send the subpacket data
|
||||||
to the --status interface.
|
to the --status interface.
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ change_pin (int chvno, int allow_admin)
|
|||||||
|
|
||||||
if (opt.batch)
|
if (opt.batch)
|
||||||
{
|
{
|
||||||
log_error (_("sorry, can't do this in batch mode\n"));
|
log_error (_("can't do this in batch mode\n"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1195,7 +1195,7 @@ card_edit (STRLIST commands)
|
|||||||
;
|
;
|
||||||
else if (opt.batch && !have_commands)
|
else if (opt.batch && !have_commands)
|
||||||
{
|
{
|
||||||
log_error(_("can't do that in batchmode\n"));
|
log_error(_("can't do this in batch mode\n"));
|
||||||
goto leave;
|
goto leave;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,14 +117,14 @@ do_delete_key( const char *username, int secret, int *r_sec_avail )
|
|||||||
okay++;
|
okay++;
|
||||||
else if( opt.batch && secret )
|
else if( opt.batch && secret )
|
||||||
{
|
{
|
||||||
log_error(_("can't do that in batchmode\n"));
|
log_error(_("can't do this in batch mode\n"));
|
||||||
log_info (_("(unless you specify the key by fingerprint)\n"));
|
log_info (_("(unless you specify the key by fingerprint)\n"));
|
||||||
}
|
}
|
||||||
else if( opt.batch && opt.answer_yes )
|
else if( opt.batch && opt.answer_yes )
|
||||||
okay++;
|
okay++;
|
||||||
else if( opt.batch )
|
else if( opt.batch )
|
||||||
{
|
{
|
||||||
log_error(_("can't do that in batchmode without \"--yes\"\n"));
|
log_error(_("can't do this in batch mode without \"--yes\"\n"));
|
||||||
log_info (_("(unless you specify the key by fingerprint)\n"));
|
log_info (_("(unless you specify the key by fingerprint)\n"));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -1309,10 +1309,11 @@ keyedit_menu( const char *username, STRLIST locusr,
|
|||||||
|
|
||||||
if ( opt.command_fd != -1 )
|
if ( opt.command_fd != -1 )
|
||||||
;
|
;
|
||||||
else if( opt.batch && !have_commands ) {
|
else if( opt.batch && !have_commands )
|
||||||
log_error(_("can't do that in batchmode\n"));
|
{
|
||||||
|
log_error(_("can't do this in batch mode\n"));
|
||||||
goto leave;
|
goto leave;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* get the public key */
|
/* get the public key */
|
||||||
rc = get_pubkey_byname (NULL, username, &keyblock, &kdbhd, 1);
|
rc = get_pubkey_byname (NULL, username, &keyblock, &kdbhd, 1);
|
||||||
|
@ -2417,7 +2417,7 @@ generate_keypair (const char *fname, const char *card_serialno,
|
|||||||
if (opt.batch && card_serialno)
|
if (opt.batch && card_serialno)
|
||||||
{
|
{
|
||||||
/* We don't yet support unattended key generation. */
|
/* We don't yet support unattended key generation. */
|
||||||
log_error (_("sorry, can't do this in batch mode\n"));
|
log_error (_("can't do this in batch mode\n"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1050,7 +1050,7 @@ ask_passphrase (const char *description,
|
|||||||
}
|
}
|
||||||
else if (opt.batch)
|
else if (opt.batch)
|
||||||
{
|
{
|
||||||
log_error(_("can't query password in batchmode\n"));
|
log_error(_("can't query password in batch mode\n"));
|
||||||
pw = NULL;
|
pw = NULL;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -1208,7 +1208,7 @@ passphrase_to_dek( u32 *keyid, int pubkey_algo,
|
|||||||
strcpy( pw, fd_passwd );
|
strcpy( pw, fd_passwd );
|
||||||
}
|
}
|
||||||
else if( opt.batch ) {
|
else if( opt.batch ) {
|
||||||
log_error(_("can't query password in batchmode\n"));
|
log_error(_("can't query password in batch mode\n"));
|
||||||
pw = m_strdup( "" ); /* return an empty passphrase */
|
pw = m_strdup( "" ); /* return an empty passphrase */
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -463,11 +463,12 @@ ask_for_detached_datafile( MD_HANDLE md, MD_HANDLE md2,
|
|||||||
tty_printf("No such file, try again or hit enter to quit.\n");
|
tty_printf("No such file, try again or hit enter to quit.\n");
|
||||||
any++;
|
any++;
|
||||||
}
|
}
|
||||||
else if( !fp ) {
|
else if( !fp )
|
||||||
log_error("can't open `%s': %s\n", answer, strerror(errno) );
|
{
|
||||||
|
log_error(_("can't open `%s': %s\n"), answer, strerror(errno));
|
||||||
rc = G10ERR_READ_FILE;
|
rc = G10ERR_READ_FILE;
|
||||||
goto leave;
|
goto leave;
|
||||||
}
|
}
|
||||||
} while( !fp );
|
} while( !fp );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
14
g10/revoke.c
14
g10/revoke.c
@ -211,10 +211,11 @@ gen_desig_revoke( const char *uname )
|
|||||||
u32 keyid[2];
|
u32 keyid[2];
|
||||||
int i,any=0;
|
int i,any=0;
|
||||||
|
|
||||||
if( opt.batch ) {
|
if( opt.batch )
|
||||||
log_error(_("sorry, can't do this in batch mode\n"));
|
{
|
||||||
|
log_error(_("can't do this in batch mode\n"));
|
||||||
return G10ERR_GENERAL;
|
return G10ERR_GENERAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
memset( &afx, 0, sizeof afx);
|
memset( &afx, 0, sizeof afx);
|
||||||
|
|
||||||
@ -411,10 +412,11 @@ gen_revoke( const char *uname )
|
|||||||
struct revocation_reason_info *reason = NULL;
|
struct revocation_reason_info *reason = NULL;
|
||||||
KEYDB_SEARCH_DESC desc;
|
KEYDB_SEARCH_DESC desc;
|
||||||
|
|
||||||
if( opt.batch ) {
|
if( opt.batch )
|
||||||
log_error(_("sorry, can't do this in batch mode\n"));
|
{
|
||||||
|
log_error(_("can't do this in batch mode\n"));
|
||||||
return G10ERR_GENERAL;
|
return G10ERR_GENERAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
memset( &afx, 0, sizeof afx);
|
memset( &afx, 0, sizeof afx);
|
||||||
init_packet( &pkt );
|
init_packet( &pkt );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user