Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extend 'file exists' check to require non-zero size
Somehow it is possible to get into a state where the privkey.pem file has a zero size when using LOCAL_CA. How this is achieved is not confirmed, but I suspect that if openssl is interrupted during its process it just truncates the file. With a simple change from -f to -s we now also require that all of the important files has a size greater than 0. The caveat with this is that a file containing a single newline character will be accepted, but let's start here and see if we need even more advanced checks. Resolves #185
- Loading branch information