-
Notifications
You must be signed in to change notification settings - Fork 317
Open
Conversation
Splits a certificate bundle back into its leaf and intermediate chain, the inverse of step certificate bundle. Pick the part to write with --leaf or --intermediate, output to STDOUT or to a file with --out. Closes smallstep#1437 Signed-off-by: Chris (ChrisJr404) <11917633+ChrisJr404@users.noreply.github.com>
CLAassistant
commented
Aug 18, 2026
CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.
1 similar comment
CLAassistant
commented
Aug 18, 2026
CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.
@github-actions
github-actions
Bot
added
the
needs triage
Waiting for discussion / prioritization by team
label
Aug 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
step certificate unbundle, the inverse ofstep certificate bundle, so you can pull the leaf or the intermediate chain back out of a bundle. Closes #1437.It reads a bundle (file or
-for STDIN), treats the first cert as the leaf and everything after it as the intermediate chain, and writes the part you ask for.--leafor--intermediatepicks which; without--outit goes to STDOUT, with--out <file>it's written to that file.I went with the
--leaf/--intermediate+--outflags from the issue rather than maraino's positional-arg variant, since hslatman leaned that way in the thread ("less room for guessing which file comes in which order"). Requiring exactly one of the two selectors keeps it unambiguous. Happy to switch to the positional form or add a "write both at once" mode if you'd rather.--intermediateon a bundle that only has a leaf errors out instead of writing an empty file.Tests in
unbundle_test.gocover splitting a 2-cert bundle (both directions), a single-cert input, bad input, and the flag-validation paths.go build ./...andgo test ./command/certificate/...both pass.