summaryrefslogtreecommitdiff
path: root/src/pki/commands/pkcs7.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pki/commands/pkcs7.c')
-rw-r--r--src/pki/commands/pkcs7.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pki/commands/pkcs7.c b/src/pki/commands/pkcs7.c
index 6c75693ab..28bcd1397 100644
--- a/src/pki/commands/pkcs7.c
+++ b/src/pki/commands/pkcs7.c
@@ -58,6 +58,7 @@ static bool write_to_stream(FILE *stream, chunk_t data)
{
size_t len, total = 0;
+ set_file_mode(stream, CERT_ASN1_DER);
while (total < data.len)
{
len = fwrite(data.ptr + total, 1, data.len - total, stream);