Module Name:    src
Committed By:   khorben
Date:           Sun Apr  9 22:48:39 UTC 2017

Modified Files:
        src/crypto/external/bsd/netpgp/dist/src/lib: signature.c

Log Message:
Output signatures to the standard output for "-"

This is to reflect the behaviour documented in netpgp(1).

Submitted on tech-pkg@ as:
[PATCH 09/11] Output signatures to the standard output for "-"

Only modified for consistency with the coding style.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 \
    src/crypto/external/bsd/netpgp/dist/src/lib/signature.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/netpgp/dist/src/lib/signature.c
diff -u src/crypto/external/bsd/netpgp/dist/src/lib/signature.c:1.35 src/crypto/external/bsd/netpgp/dist/src/lib/signature.c:1.36
--- src/crypto/external/bsd/netpgp/dist/src/lib/signature.c:1.35	Sun Apr  9 22:44:34 2017
+++ src/crypto/external/bsd/netpgp/dist/src/lib/signature.c	Sun Apr  9 22:48:39 2017
@@ -57,7 +57,7 @@
 
 #if defined(__NetBSD__)
 __COPYRIGHT("@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.");
-__RCSID("$NetBSD: signature.c,v 1.35 2017/04/09 22:44:34 khorben Exp $");
+__RCSID("$NetBSD: signature.c,v 1.36 2017/04/09 22:48:39 khorben Exp $");
 #endif
 
 #include <sys/types.h>
@@ -903,7 +903,11 @@ open_output_file(pgp_output_t **output,
 
 	/* setup output file */
 	if (outname) {
-		fd = pgp_setup_file_write(output, outname, overwrite);
+		if (strcmp(outname, "-") == 0) {
+			fd = pgp_setup_file_write(output, NULL, overwrite);
+		} else {
+			fd = pgp_setup_file_write(output, outname, overwrite);
+		}
 	} else {
 		size_t          flen = strlen(inname) + 4 + 1;
 		char           *f = NULL;

Reply via email to