yubihsm-shell icon indicating copy to clipboard operation
yubihsm-shell copied to clipboard

fix binary output to stdout

Open joostd opened this issue 7 months ago • 0 comments

A newline is written to stdout in command-line mode. This causes issues with binary output. For example:

echo -n 0123456789abcdef | yubihsm-shell -p password -a encrypt-aesecb -i 123 | yubihsm-shell -p password -a decrypt-aesecb -i 123

Other commands have similar issues (e.g. -a get-pseudo-random --count=16 --outformat binary | wc -c outputs 17) This patch simply drops the newline when writing binary output to stdout.

joostd avatar Jul 15 '24 09:07 joostd