yubihsm-shell
yubihsm-shell copied to clipboard
fix binary output to stdout
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.