diff options
| author | khorben <khorben@NetBSD.org> | 2017-04-09 22:48:39 +0000 |
|---|---|---|
| committer | khorben <khorben@NetBSD.org> | 2017-04-09 22:48:39 +0000 |
| commit | 7d28fa2910d40be5663e83ff5880be86fc29683b (patch) | |
| tree | 10bb508eb5c90ca28aa0760de37e3fe67c101cd1 /crypto | |
| parent | aebf52ae4cdca0ca734dcfad5c055763722a2c33 (diff) | |
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 (limited to 'crypto')
| -rw-r--r-- | crypto/external/bsd/netpgp/dist/src/lib/signature.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/crypto/external/bsd/netpgp/dist/src/lib/signature.c b/crypto/external/bsd/netpgp/dist/src/lib/signature.c index 0c75fe1d555..8b0d977967c 100644 --- a/crypto/external/bsd/netpgp/dist/src/lib/signature.c +++ b/crypto/external/bsd/netpgp/dist/src/lib/signature.c @@ -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; |
