"sqop generate-key --with-key-password=@fd:3 <<<foo 'test uid'" fails because of trailing whitespace in the herestring
Using bash, we can put a passphrase in a herestring using the @FD:
special designator:
$ sqop generate-key --with-key-password=@FD:3 3<<<foo 'test uid'
But note that bash by default injects a trailing newline on the herestring.
sqop generate-key
explicitly and deliberately fails here, claiming Non-UTF-8 or otherwise unreliable password
.
https://www.ietf.org/archive/id/draft-dkg-openpgp-stateless-cli-04.html#section-8.8.1 suggests that the implementation should instead trim trailing whitespace before applying more strict password verifications.
I note that using such a herestring to decrypt using a key works fine, because sqop decrypt
is clever enough to retry the password with trailing whitespace trimmed.