aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--NEWS3
-rw-r--r--TODO5
-rw-r--r--doc/gpg.sgml2
-rw-r--r--g10/ChangeLog10
-rw-r--r--g10/armor.c1
-rw-r--r--g10/encode.c1
-rw-r--r--g10/filter.h3
-rw-r--r--g10/textfilter.c21
-rw-r--r--g10/verify.c16
10 files changed, 53 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index d8c563a69..2481a55c5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Tue Sep 28 20:54:37 CEST 1999 Werner Koch <[email protected]>
+
+ * textfilter.c (copy_clearsig_text) [__MINGW32__): Use CR,LF.
+
Fri Sep 17 12:56:42 CEST 1999 Werner Koch <[email protected]>
* configure.in: Add "-lcap" when capabilities are requested.
diff --git a/NEWS b/NEWS
index 5629e321d..aa1b82837 100644
--- a/NEWS
+++ b/NEWS
@@ -1,7 +1,8 @@
* New command --verify-files.
- * Fixed some minor bugs.
+ * Fixed some minor bugs and the problem with conventional encrypted
+ packets which did use the gpg v3 partial length headers.
* Add Indonesian and Portugese translations.
diff --git a/TODO b/TODO
index 8f6982129..735841c4e 100644
--- a/TODO
+++ b/TODO
@@ -3,11 +3,6 @@
(requested by Herny Spencer) or change the error message to
a more clear one.
-W32 only:
-- End of ASCII lines in clearsig files : when you clearsig a ANSI text file
-(the Windows text format), the ends of line are in Unix format (linefeed)
-instead of Win32 format (carriage return + linefeed).
-
Scheduled for 1.1
-----------------
diff --git a/doc/gpg.sgml b/doc/gpg.sgml
index 0cae9b476..4e386635e 100644
--- a/doc/gpg.sgml
+++ b/doc/gpg.sgml
@@ -269,7 +269,7 @@ only in the local environment.</para></listitem></varlistentry>
<term>revsig</term>
<listitem><para>
Revoke a signature. GnuPG asks for every
-every signature which has been done by one of
+signature which has been done by one of
the secret keys, whether a revocation
certificate should be generated.</para></listitem></varlistentry>
<varlistentry>
diff --git a/g10/ChangeLog b/g10/ChangeLog
index aa3e38c04..83620ff73 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,13 @@
+Tue Sep 28 20:54:37 CEST 1999 Werner Koch <[email protected]>
+
+ * encode.c (encode_simple): Use new CTB when we don't have the
+ length of the file. This is somewhat strange as the comment above
+ indicates that this part is actually fixed for PGP 5 - maybe I simply
+ lost the source line, tsss.
+
+ * armor.c (armor_filter): Set a flag if no OpenPGP data has been found.
+ * verify.c (verify_signatures): Add an error helptext.
+
Thu Sep 23 19:24:30 CEST 1999 Werner Koch <[email protected]>
* openfile.c (open_outfile): Fixed the 8dot3 handling.
diff --git a/g10/armor.c b/g10/armor.c
index 38c48fbbe..d0cbfd067 100644
--- a/g10/armor.c
+++ b/g10/armor.c
@@ -999,6 +999,7 @@ armor_filter( void *opaque, int control,
}
else if( !afx->any_data && !afx->inp_bypass ) {
log_error(_("no valid OpenPGP data found.\n"));
+ afx->no_openpgp_data = 1;
write_status_text( STATUS_NODATA, "1" );
}
if( afx->truncated )
diff --git a/g10/encode.c b/g10/encode.c
index bc03401ac..2149cb0c4 100644
--- a/g10/encode.c
+++ b/g10/encode.c
@@ -177,6 +177,7 @@ encode_simple( const char *filename, int mode )
pt->timestamp = make_timestamp();
pt->mode = opt.textmode? 't' : 'b';
pt->len = filesize;
+ pt->new_ctb = !pt->len && !opt.rfc1991;
pt->buf = inp;
pkt.pkttype = PKT_PLAINTEXT;
pkt.pkt.plaintext = pt;
diff --git a/g10/filter.h b/g10/filter.h
index 86a8e45b8..49d92103b 100644
--- a/g10/filter.h
+++ b/g10/filter.h
@@ -35,6 +35,9 @@ typedef struct {
int only_keyblocks; /* skip all headers but ".... key block" */
const char *hdrlines; /* write these headerlines */
+ /* these fileds must be initialized to zero */
+ int no_openpgp_data; /* output flag: "No valid OpenPGP data found" */
+
/* the following fields must be initialized to zero */
int inp_checked; /* set if the input has been checked */
int inp_bypass; /* set if the input is not armored */
diff --git a/g10/textfilter.c b/g10/textfilter.c
index 3125925b6..dc143b354 100644
--- a/g10/textfilter.c
+++ b/g10/textfilter.c
@@ -183,11 +183,32 @@ copy_clearsig_text( IOBUF out, IOBUF inp, MD_HANDLE md,
iobuf_put( out, '-' );
iobuf_put( out, ' ' );
}
+ #ifdef __MINGW32__
+ /* make sure the lines do end in CR,LF */
+ if( n > 1 && ( (buffer[n-2] == '\r' && buffer[n-1] == '\n' )
+ || (buffer[n-2] == '\n' && buffer[n-1] == '\r'))) {
+ iobuf_write( out, buffer, n-2 );
+ iobuf_put( out, '\r');
+ iobuf_put( out, '\n');
+ }
+ else if( n && buffer[n-1] == '\n' ) {
+ iobuf_write( out, buffer, n-1 );
+ iobuf_put( out, '\r');
+ iobuf_put( out, '\n');
+ }
+ else
+ iobuf_write( out, buffer, n );
+
+ #else
iobuf_write( out, buffer, n );
+ #endif
}
/* at eof */
if( !pending_lf ) { /* make sure that the file ends with a LF */
+ #ifndef __MINGW32__
+ iobuf_put( out, '\r');
+ #endif
iobuf_put( out, '\n');
if( !escape_dash )
md_putc( md, '\n' );
diff --git a/g10/verify.c b/g10/verify.c
index 680fed0ff..d0feda7aa 100644
--- a/g10/verify.c
+++ b/g10/verify.c
@@ -59,6 +59,7 @@ verify_signatures( int nfiles, char **files )
int i, rc;
STRLIST sl;
+ memset( &afx, 0, sizeof afx);
sigfile = nfiles? *files : NULL;
/* open the signature file */
@@ -68,12 +69,8 @@ verify_signatures( int nfiles, char **files )
return G10ERR_OPEN_FILE;
}
- if( !opt.no_armor ) {
- if( use_armor_filter( fp ) ) {
- memset( &afx, 0, sizeof afx);
- iobuf_push_filter( fp, armor_filter, &afx );
- }
- }
+ if( !opt.no_armor && use_armor_filter( fp ) )
+ iobuf_push_filter( fp, armor_filter, &afx );
sl = NULL;
for(i=1 ; i < nfiles; i++ )
@@ -81,6 +78,13 @@ verify_signatures( int nfiles, char **files )
rc = proc_signature_packets( NULL, fp, sl, sigfile );
free_strlist(sl);
iobuf_close(fp);
+ if( afx.no_openpgp_data && rc == -1 ) {
+ log_error(_("the signature could not be verified.\n"
+ "Please remember that the signature file (.sig or .asc)\n"
+ "should be the first file given on the command line.\n") );
+ rc = 0;
+ }
+
return rc;
}