The key file can be read and written only by the owner

This commit is contained in:
Jérémy Dubois 2022-08-31 11:35:12 +02:00
parent e886ca9549
commit 34b53e63f2
2 changed files with 3 additions and 0 deletions

View file

@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
* The key file can be read and written only by the owner
### Changed
### Fixed

View file

@ -692,6 +692,7 @@ create() {
>/dev/null 2>&1
# shellcheck disable=SC2181
if [ "$?" -eq 0 ]; then
chmod 600 "${key_file}"
echo "The KEY file is available at \`${key_file}'"
else
error "Error generating the private key"