From: Guus Sliepen Date: Fri, 22 Oct 2010 20:42:21 +0000 (+0200) Subject: Ensure there is a newline character before a PEM key is written. X-Git-Tag: release-1.0.14~41 X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=commitdiff_plain;h=a08462bf845973016e061b8ca1233142d80416f6;hp=c6ccbadfcf93a7bd4a88dee8ff146b4db7f85e71 Ensure there is a newline character before a PEM key is written. --- diff --git a/src/tincd.c b/src/tincd.c index a8e55596..a618e63f 100644 --- a/src/tincd.c +++ b/src/tincd.c @@ -365,6 +365,7 @@ static bool keygen(int bits) { fchmod(fileno(f), 0600); #endif + fputc('\n', f); PEM_write_RSAPrivateKey(f, rsa_key, NULL, NULL, 0, NULL, NULL); fclose(f); free(filename); @@ -382,6 +383,7 @@ static bool keygen(int bits) { if(disable_old_keys(f)) fprintf(stderr, "Warning: old key(s) found and disabled.\n"); + fputc('\n', f); PEM_write_RSAPublicKey(f, rsa_key); fclose(f); free(filename);