Commit graph

5 commits

Author SHA1 Message Date
sw1tchbl4d3
b34d64fd5c Don't search for tty, open it directly. 2022-12-20 22:51:14 +01:00
sw1tchbl4d3
abab0046ee Add ability to read password from stdin
This can be done by supplying `-` as the first argument.
2022-12-17 00:25:24 +01:00
sw1tchbl4d3
9ce20a62a4 Simplify tty finding process in readpassphrase
This went through a bunch of hoops before to acquire a file descriptor
we already had, this is now ommited.
2022-12-17 00:12:03 +01:00
sw1tchbl4d3
fd4ee6a712 Use the correct file descriptor for printing
Before we used printf("\n"); to simulate the enter key the user pressed,
which prints to normal stdout, which could have been redirected.
Now we directly write to the found TTY.

We also close the TTY file descriptor on every code path now.
2022-05-06 08:19:18 +02:00
sw1tchbl4d3
d09a59a77e Add own readpassphrase function
This removes the libbsd dependency.
Fixed #10.
2022-05-05 08:21:48 +02:00