fufesou
|
873230e35a
|
fix: key file perm (#705)
* fix: key file perm
Signed-off-by: fufesou <linlong1266@gmail.com>
* fix: enforce secure private key permissions on Unix
Create new keys with mode 0600 and verify permissions before writing.
Tighten existing keys to 0600 and propagate permission failures.
Preserve dangling symlinks and clean up failed key creation.
Signed-off-by: fufesou <linlong1266@gmail.com>
* fix: preserve read-only keys and prevent public key clobbering
Accept existing 0400 keys without changing their permissions.
Write the public key only after private key creation and writing succeed.
Signed-off-by: fufesou <linlong1266@gmail.com>
* fix: generate missing public keys and reject mismatched key pairs
Signed-off-by: fufesou <linlong1266@gmail.com>
* fix: publish public keys atomically without overwriting existing files
Signed-off-by: fufesou <linlong1266@gmail.com>
* fix: key file perms, comments
Signed-off-by: fufesou <linlong1266@gmail.com>
* fix: reject key conflicts and clean up failed private key writes
Reuse symlink resolution and simplify key loading and regression tests.
Signed-off-by: fufesou <linlong1266@gmail.com>
* fix: key file perm, simple refactor
Signed-off-by: fufesou <linlong1266@gmail.com>
---------
Signed-off-by: fufesou <linlong1266@gmail.com>
|
2026-10-10 17:34:18 +08:00 |
|