projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Ensure there is a newline character before a PEM key is written.
[tinc]
/
src
/
tincd.c
diff --git
a/src/tincd.c
b/src/tincd.c
index
a8e5559
..
a618e63
100644
(file)
--- a/
src/tincd.c
+++ b/
src/tincd.c
@@
-365,6
+365,7
@@
static bool keygen(int bits) {
fchmod(fileno(f), 0600);
#endif
fchmod(fileno(f), 0600);
#endif
+ fputc('\n', f);
PEM_write_RSAPrivateKey(f, rsa_key, NULL, NULL, 0, NULL, NULL);
fclose(f);
free(filename);
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");
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);
PEM_write_RSAPublicKey(f, rsa_key);
fclose(f);
free(filename);