mirror of
git://git.gnupg.org/gnupg.git
synced 2025-02-22 19:58:29 +01:00
* delkey.c (do_delete_key): Allow deleting a public key with a secret
present if --expert is set. * plaintext.c (handle_plaintext): Make bytecount static so it works with multiple literal packets inside a message.
This commit is contained in:
parent
d08daf31e0
commit
693e4440b2
@ -1,3 +1,11 @@
|
||||
2004-02-25 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* delkey.c (do_delete_key): Allow deleting a public key with a
|
||||
secret present if --expert is set.
|
||||
|
||||
* plaintext.c (handle_plaintext): Make bytecount static so it
|
||||
works with multiple literal packets inside a message.
|
||||
|
||||
2004-02-24 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* encode.c (encode_simple): Show cipher with --verbose.
|
||||
|
@ -1,5 +1,6 @@
|
||||
/* delkey.c - delete keys
|
||||
* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
* Copyright (C) 1998, 1999, 2000, 2001, 2002,
|
||||
* 2004 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
@ -98,7 +99,7 @@ do_delete_key( const char *username, int secret, int *r_sec_avail )
|
||||
pk = node->pkt->pkt.public_key;
|
||||
keyid_from_pk( pk, keyid );
|
||||
rc = seckey_available( keyid );
|
||||
if( !rc ) {
|
||||
if( !rc && !opt.expert ) {
|
||||
*r_sec_avail = 1;
|
||||
rc = -1;
|
||||
goto leave;
|
||||
|
@ -41,7 +41,6 @@
|
||||
#include "i18n.h"
|
||||
|
||||
|
||||
|
||||
/****************
|
||||
* Handle a plaintext packet. If MFX is not NULL, update the MDs
|
||||
* Note: we should use the filter stuff here, but we have to add some
|
||||
@ -54,7 +53,7 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx,
|
||||
{
|
||||
char *fname = NULL;
|
||||
FILE *fp = NULL;
|
||||
off_t count=0;
|
||||
static off_t count=0;
|
||||
int rc = 0;
|
||||
int c;
|
||||
int convert = pt->mode == 't';
|
||||
@ -136,7 +135,7 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx,
|
||||
#endif
|
||||
if( fp )
|
||||
{
|
||||
if(opt.max_output && (count++)>opt.max_output)
|
||||
if(opt.max_output && (++count)>opt.max_output)
|
||||
{
|
||||
log_error("Error writing to `%s': %s\n",
|
||||
fname,"exceeded --max-output limit\n");
|
||||
@ -202,7 +201,7 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx,
|
||||
#endif
|
||||
if( fp )
|
||||
{
|
||||
if(opt.max_output && (count++)>opt.max_output)
|
||||
if(opt.max_output && (++count)>opt.max_output)
|
||||
{
|
||||
log_error("Error writing to `%s': %s\n",
|
||||
fname,"exceeded --max-output limit\n");
|
||||
@ -265,7 +264,7 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx,
|
||||
while( (c = iobuf_get(pt->buf)) != -1 ) {
|
||||
if( fp )
|
||||
{
|
||||
if(opt.max_output && (count++)>opt.max_output)
|
||||
if(opt.max_output && (++count)>opt.max_output)
|
||||
{
|
||||
log_error("Error writing to `%s': %s\n",
|
||||
fname,"exceeded --max-output limit\n");
|
||||
|
Loading…
x
Reference in New Issue
Block a user