pki: Switch to binary mode on Windows when reading/writing DER to FDs

This commit is contained in:
Martin Willi
2014-06-04 15:53:11 +02:00
parent f1e7b9b0d7
commit 13298719e3
13 changed files with 49 additions and 1 deletions
+1
View File
@@ -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);