You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add step certificate unbundle subcommand for separating certificate chains #1437
step certificate unbundle leaf-chain.crt leaf.crt intermediate-chain.crt - separates certificate chain into separate files. One with just the leaf certificate and the other with the intermediate chain.
step certificate unbundle --leaf leaf-chain.crt - Output the leaf certificate to stdout (or stderror, whatever the other commands do). Assume PEM format for output.
step certificate unbundle --intermediate leaf-chain.crt - Output the intermediate chain to stdout (or stderror, whatever the other commands do). Assume PEM format for output.
step certificate unbundle --leaf --out leaf.crt leaf-chain.crt - Write the leaf out to a file specified by the --out flag.
step certificate unbundle --intermediate --out intermediate.crt leaf-chain.crt - Write the intermediate out to a file specified by the --out flag.
While slightly more typing is involved, I have a preference for the initially suggested flags, as there's less room for guessing which file comes in which order. I'd say adding --out is fine, since we're already using that in a few places, but it's effectively the same as redirection using >.
Activity
maraino commentedon Jun 11, 2025
Instead of using the
--outflag, we could use the number of arguments:Alternatively instead of using the
--outflag we could use--leaf leaf.crtand--intermediate.crtif we want to be more explicit.aliamerj commentedon Jun 11, 2025
Hey @dopey! 👋
I just finished a PR (#1438) adding --intermediate-file to split certs during generation.
This unbundle command looks like the perfect companion for existing files! Happy to tackle it next if you want.
Same cert-chain logic I just implemented, so I can move fast. Let me know!
hslatman commentedon Jun 11, 2025
While slightly more typing is involved, I have a preference for the initially suggested flags, as there's less room for guessing which file comes in which order. I'd say adding
--outis fine, since we're already using that in a few places, but it's effectively the same as redirection using>.