Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix binary output to stdout #410

Merged
merged 1 commit into from
Aug 8, 2024
Merged

fix binary output to stdout #410

merged 1 commit into from
Aug 8, 2024

Conversation

joostd
Copy link
Contributor

@joostd joostd commented Jul 15, 2024

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.

A superfluous 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
@aveenismail aveenismail merged commit 4d6142e into Yubico:master Aug 8, 2024
27 of 31 checks passed
@joostd joostd deleted the patch-3 branch August 8, 2024 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants