Commit Graph
6 Commits
Author SHA1 Message Date
lotherk 05b8251333 add the man page, CI, and install it alongside the binary
ci / build (push) Failing after 45s
docs/sshcrypt.1 documents options, environment, exit codes and the security
limits; make lint-man lints it and CI runs that. The Gitea workflow builds,
runs make check, lints the page, then repeats the suite under ASan+UBSan.
make install now writes the man page too.
2026-11-21 16:50:28 +00:00
lotherk 5eaa930520 unlink the converted key when the conversion is interrupted
SIGINT at the passphrase prompt used to leave the 0600 temp file in /dev/shm
until reboot. A handler for INT, TERM and HUP removes it and exits. The test
interrupts a real pty session and checks the temp directory.
2026-11-21 16:19:34 +00:00
lotherk d471ec1723 fix the tty prompt: restore echo, keep queued input
The old prompt saved termios, disabled ECHO, then re-read termios into the
same struct to restore it - which restored the no-echo state. Because termios
belongs to the terminal, not the fd, the user's shell was left without echo.
TCSAFLUSH also discarded a passphrase that was already queued in the tty.

Save the original state once, restore that copy, and use TCSANOW. Two
script(1) cases now cover the prompt end to end and go red on the old code.
2026-11-21 16:16:33 +00:00
lotherk 8731e66501 README: say what -F does; name the unsupported key type 2026-11-21 10:58:19 +00:00
lotherk 2fa11265f6 drop the unused public-key entry point and the unused flag 2026-11-21 10:58:00 +00:00
lotherk 0afb114993 sshcrypt: encrypt to an SSH public key, decrypt with the private key
C99/POSIX tool, one job: -r PUBKEY encrypts, -d -k PRIVKEY decrypts.
Ed25519 goes through X25519 + HKDF-SHA256 + ChaCha20-Poly1305, RSA through
RSA-OAEP-SHA256. Text armor by default so the message survives mail and chat.
OpenSSH private keys are converted through ssh-keygen; no other subprocess is
ever started.
2026-11-21 10:56:55 +00:00