jose
jose copied to clipboard
Possibly implement a jwe hdr subcommand
The clevis unlockers use the idiom
read -r -d . hdr
to read the heaader of the jwe on stdin, and the header only.
Now I'd like to move that logic to jose since the above way
- deals with jwe internals that should not be visible on this layer,
- is therefore not easy to understand, and
- is a bashism which is really hard to eliminate¹².
As a solution I propose a new subcommand that does the same. The above statement would be rewritten as
hdr="$(jose jwe hdr --input=- --output=-)"
and I consider that an improvement.
¹ Since all solutions that are around slurp the entire input, something I want to avoid at any cost. ² I managed to replace all the other bashsims, you'll find that as an clevis issue soon.