otpcli.c: read from standard input with a filename of "-"
commit5aec958c47f7a930e636d4d565a5b035521f15a9
authorKyle J. McKay <mackyle@gmail.com>
Mon, 21 Aug 2023 07:21:48 +0000 (21 00:21 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Mon, 21 Aug 2023 07:21:48 +0000 (21 00:21 -0700)
treee83d7164d4ace933c5b7ad82c0710ef9e06597aa
parent6a82e9bb7638b9b4ab29c3f38d09f65eec1aaf8f
otpcli.c: read from standard input with a filename of "-"

It may be convenient to read the secret from standard input in order
to more easily pass it in without otherwise revealing it or having
it be saved in a file.

Allow a filename of "-" to mean read from standard input.

Do, however, refuse to read a binary secret from standard input if
standard input is a tty.
otpcli.c