mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-16 13:56:29 +00:00
Open output file in binary mode for writing binary PKCS7 message.
Bug 301496. Patch by Alexei.Volkov, r=nelson
This commit is contained in:
parent
752393c64e
commit
7e12526836
@ -37,7 +37,7 @@
|
||||
/*
|
||||
* p7env -- A command to create a pkcs7 enveloped data.
|
||||
*
|
||||
* $Id: p7env.c,v 1.7 2004/10/07 04:12:47 julien.pierre.bugs%sun.com Exp $
|
||||
* $Id: p7env.c,v 1.8 2007/01/26 01:15:43 nelson%bolyard.com Exp $
|
||||
*/
|
||||
|
||||
#include "nspr.h"
|
||||
@ -209,7 +209,7 @@ main(int argc, char **argv)
|
||||
break;
|
||||
|
||||
case 'o':
|
||||
outFile = fopen(optstate->value, "w");
|
||||
outFile = fopen(optstate->value, "wb");
|
||||
if (!outFile) {
|
||||
fprintf(stderr, "%s: unable to open \"%s\" for writing\n",
|
||||
progName, optstate->value);
|
||||
|
@ -38,7 +38,7 @@
|
||||
* p7sign -- A command to create a *detached* pkcs7 signature (over a given
|
||||
* input file).
|
||||
*
|
||||
* $Id: p7sign.c,v 1.12 2007/01/25 00:52:25 alexei.volkov.bugs%sun.com Exp $
|
||||
* $Id: p7sign.c,v 1.13 2007/01/26 01:15:43 nelson%bolyard.com Exp $
|
||||
*/
|
||||
|
||||
#include "nspr.h"
|
||||
@ -238,7 +238,7 @@ main(int argc, char **argv)
|
||||
break;
|
||||
|
||||
case 'o':
|
||||
outFile = fopen(optstate->value, "w");
|
||||
outFile = fopen(optstate->value, "wb");
|
||||
if (!outFile) {
|
||||
fprintf(stderr, "%s: unable to open \"%s\" for writing\n",
|
||||
progName, optstate->value);
|
||||
|
Loading…
x
Reference in New Issue
Block a user