diff options
Diffstat (limited to 'src/tools/tor-gencert.c')
-rw-r--r-- | src/tools/tor-gencert.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/tools/tor-gencert.c b/src/tools/tor-gencert.c index a8ffc07796..38b2101a3c 100644 --- a/src/tools/tor-gencert.c +++ b/src/tools/tor-gencert.c @@ -497,7 +497,12 @@ generate_certificate(void) return 1; } - fputs(buf, f); + if (fputs(buf, f) < 0) { + log_err(LD_GENERAL, "Couldn't write to %s: %s", + certificate_file, strerror(errno)); + fclose(f); + return 1; + } fclose(f); return 0; } |