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.
This commit is contained in:
teor
2014-10-19 17:48:07 +11:00
parent ce7fd6e160
commit fd7e9e9030
8 changed files with 79 additions and 26 deletions
@@ -1,7 +1,17 @@
o Minor bugfixes
- Stop failing when key files are zero-length. Instead, generate new
keys, and overwrite the empty key files.
Fixes bug 13111.
- Stop generating a fresh .old RSA key file when the .old file is missing.
Fixed as part of bug 13111.
- Avoid overwriting .old key files with empty key files.
Fixed as part of bug 13111.
- Stop crashing when a NULL filename is passed to file_status().
Fixed as part of bug 13111.
o Minor enhancements:
- Skip loading zero-length extra info store, router store, stats, state,
and key files.
Implemented with bug 13111.
- Return FN_ERROR when a zero-length filename is passed to file_status().
Fixed as part of bug 13111.