Closed asm582 closed 9 years ago
Thanks for your suggested patch. However, I'd prefer the script not overwrite existing files, especially if we are dealing with things that are likely irreplacable. (E.g., I wouldn't want to have to restore the production CH from backup because I accidentially recreated softwareupdater keys in the wrong dir).
I'd appreciate a new PR with generatekeys
bailing out and commenting that it will not overwrite existing files. It should check both target files, .publickey
and .privatekey
before attempting to create keys. This forces the user to decide to remove / rename the existing files before proceeding.
I tested this PR on Mac OS X, this is my test result:
My suggestion is that it should print information to tell users when clearing existed keys. And it needs to add a unit test.