Stop failing when key files are zero-length
commitfd7e9e9030cee9d8e863cea3f3f90226ae66fdfe
authorteor <teor2345@gmail.com>
Sun, 19 Oct 2014 06:48:07 +0000 (19 17:48 +1100)
committerteor <teor2345@gmail.com>
Sat, 8 Nov 2014 09:31:20 +0000 (8 20:31 +1100)
treea9ca33e658ff76b7a4bf4a7d5f9dd3a4936da575
parentce7fd6e160e2e3acb824b29e29afe15cd5e7bf4f
Stop failing when key files are zero-length

Instead, generate new keys, and overwrite the empty key files.
Adds FN_EMPTY to file_status_t and file_status.
Fixes bug 13111.

Related changes due to review of FN_FILE usage:
Stop generating a fresh .old RSA key file when the .old file is missing.
Avoid overwriting .old key files with empty key files.
Skip loading zero-length extra info store, router store, stats, state,
and key files.
changes/bug13111-generate-keys-on-empty-file
src/common/compat.c
src/common/util.c
src/common/util.h
src/or/config.c
src/or/router.c
src/or/routerlist.c
src/or/statefile.c