Commit 3966d71f authored by Paul Bakker's avatar Paul Bakker
Browse files

gen_key should open file as binary for writing DER keys

parent b196fc23
......@@ -146,7 +146,7 @@ static int write_private_key( pk_context *key, const char *output_file )
c = output_buf + sizeof(output_buf) - len;
}
if( ( f = fopen( output_file, "w" ) ) == NULL )
if( ( f = fopen( output_file, "wb" ) ) == NULL )
return( -1 );
if( fwrite( c, 1, len, f ) != len )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment