aboutsummaryrefslogtreecommitdiffstats
path: root/g10/armor.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>1998-08-11 17:29:34 +0000
committerWerner Koch <[email protected]>1998-08-11 17:29:34 +0000
commit3e0e8f884f1ed37e120beeb57aa7cd79e3c145a0 (patch)
treedfff62df60f917addc9df4e83a1ed73e31041bab /g10/armor.c
parentrel 0.3.3 (diff)
downloadgnupg-0-3-4.tar.gz
gnupg-0-3-4.zip
bug fix releaseV0-3-4
Diffstat (limited to 'g10/armor.c')
-rw-r--r--g10/armor.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/g10/armor.c b/g10/armor.c
index 45f962f01..f5116acd0 100644
--- a/g10/armor.c
+++ b/g10/armor.c
@@ -1002,8 +1002,25 @@ armor_filter( void *opaque, int control,
iobuf_writestr(a, "-----\n");
iobuf_writestr(a, "Version: GNUPG v" VERSION " ("
PRINTABLE_OS_NAME ")\n");
- iobuf_writestr(a,
- "Comment: Get GNUPG from ftp://ftp.guug.de/pub/gcrypt/\n");
+
+ if( opt.comment_string ) {
+ const char *s = opt.comment_string;
+ iobuf_writestr(a, "Comment: " );
+ for( ; *s; s++ ) {
+ if( *s == '\n' )
+ iobuf_writestr(a, "\\n" );
+ else if( *s == '\r' )
+ iobuf_writestr(a, "\\r" );
+ else if( *s == '\v' )
+ iobuf_writestr(a, "\\v" );
+ else
+ iobuf_put(a, *s );
+ }
+ iobuf_put(a, '\n' );
+ }
+ else
+ iobuf_writestr(a,
+ "Comment: Get GNUPG from ftp://ftp.guug.de/pub/gcrypt/\n");
if( afx->hdrlines )
iobuf_writestr(a, afx->hdrlines);
iobuf_put(a, '\n');