oath-toolkit-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug#839278: oathtool: has no secure way to provide a key


From: Simon Josefsson
Subject: Bug#839278: oathtool: has no secure way to provide a key
Date: Sun, 27 Dec 2020 10:24:05 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

tags 839278 +upstream
tags 839278 +fixed-upstream
tags 839278 +confirmed
thanks

Ian Jackson <ijackson@chiark.greenend.org.uk> writes:

>> If someone wants to add support for reading from a numbered file
>> descriptor, I'm happy to merge that -- how about '*42'?  Just don't pick
>> a character that is in the base64 alphabet (right now only hex and
>> base32 are supported, but maybe base64 support will be added in the
>> future).  The '*' character would work.  Is this useful though?
>
> On many operating systems @/dev/fd/N would work nicely.

Indeed!  This appears to work:

jas@latte:~/src/oath-toolkit$ echo 00 | oathtool/oathtool @/dev/stdin
328482
jas@latte:~/src/oath-toolkit$ echo 00 | oathtool/oathtool @/dev/fd/0
328482
jas@latte:~/src/oath-toolkit$ 

I am confused why this works though:

jas@latte:~/src/oath-toolkit$ oathtool/oathtool @/dev/fd/1
00   <-- I type `00 RET' in the terminal
328482
jas@latte:~/src/oath-toolkit$ oathtool/oathtool @/dev/fd/2
00   <-- I type `00 RET' in the terminal
328482
jas@latte:~/src/oath-toolkit$ 

Thoughts?  Reading from stdout or stderr seems weird, but I don't know
what to expect.  For what it's worth, `cat' behaves the same.

As expected non-open file descriptors yield an error:

jas@latte:~/src/oath-toolkit$ oathtool/oathtool @/dev/fd/3
oathtool: open file for KEY/OTP: No such file or directory
jas@latte:~/src/oath-toolkit$ 

/Simon

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]