aboutsummaryrefslogtreecommitdiffstats
path: root/g10/sign.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/sign.c')
-rw-r--r--g10/sign.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/g10/sign.c b/g10/sign.c
index 9dad9b300..4463f66f5 100644
--- a/g10/sign.c
+++ b/g10/sign.c
@@ -631,6 +631,7 @@ sign_file( STRLIST filenames, int detached, STRLIST locusr,
compress_filter_context_t zfx;
md_filter_context_t mfx;
text_filter_context_t tfx;
+ progress_filter_context_t pfx;
encrypt_filter_context_t efx;
IOBUF inp = NULL, out = NULL;
PACKET pkt;
@@ -677,11 +678,15 @@ sign_file( STRLIST filenames, int detached, STRLIST locusr,
/* prepare iobufs */
if( multifile ) /* have list of filenames */
inp = NULL; /* we do it later */
- else if( !(inp = iobuf_open(fname)) ) {
- log_error("can't open %s: %s\n", fname? fname: "[stdin]",
- strerror(errno) );
- rc = G10ERR_OPEN_FILE;
- goto leave;
+ else {
+ if( !(inp = iobuf_open(fname)) ) {
+ log_error("can't open %s: %s\n", fname? fname: "[stdin]",
+ strerror(errno) );
+ rc = G10ERR_OPEN_FILE;
+ goto leave;
+ }
+
+ handle_progress (&pfx, inp, fname);
}
if( outfile ) {
@@ -819,6 +824,7 @@ sign_file( STRLIST filenames, int detached, STRLIST locusr,
rc = G10ERR_OPEN_FILE;
goto leave;
}
+ handle_progress (&pfx, inp, sl->d);
if( opt.verbose )
fprintf(stderr, " `%s'", sl->d );
if(opt.textmode)
@@ -882,6 +888,7 @@ int
clearsign_file( const char *fname, STRLIST locusr, const char *outfile )
{
armor_filter_context_t afx;
+ progress_filter_context_t pfx;
MD_HANDLE textmd = NULL;
IOBUF inp = NULL, out = NULL;
PACKET pkt;
@@ -919,6 +926,7 @@ clearsign_file( const char *fname, STRLIST locusr, const char *outfile )
rc = G10ERR_OPEN_FILE;
goto leave;
}
+ handle_progress (&pfx, inp, fname);
if( outfile ) {
if( !(out = iobuf_create( outfile )) ) {
@@ -1014,6 +1022,7 @@ int
sign_symencrypt_file (const char *fname, STRLIST locusr)
{
armor_filter_context_t afx;
+ progress_filter_context_t pfx;
compress_filter_context_t zfx;
md_filter_context_t mfx;
text_filter_context_t tfx;
@@ -1049,6 +1058,7 @@ sign_symencrypt_file (const char *fname, STRLIST locusr)
rc = G10ERR_OPEN_FILE;
goto leave;
}
+ handle_progress (&pfx, inp, fname);
/* prepare key */
s2k = m_alloc_clear( sizeof *s2k );