Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/crypto/external/bsd/netpgp/dist/src/lib Output signatures to...



details:   https://anonhg.NetBSD.org/src/rev/52becc8037ba
branches:  trunk
changeset: 822841:52becc8037ba
user:      khorben <khorben%NetBSD.org@localhost>
date:      Sun Apr 09 22:48:39 2017 +0000

description:
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.

diffstat:

 crypto/external/bsd/netpgp/dist/src/lib/signature.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (25 lines):

diff -r 28caaea8a055 -r 52becc8037ba crypto/external/bsd/netpgp/dist/src/lib/signature.c
--- a/crypto/external/bsd/netpgp/dist/src/lib/signature.c       Sun Apr 09 22:44:34 2017 +0000
+++ b/crypto/external/bsd/netpgp/dist/src/lib/signature.c       Sun Apr 09 22:48:39 2017 +0000
@@ -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 @@
 
        /* 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;



Home | Main Index | Thread Index | Old Index