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.
This changeset contains three patches for the OpenSSH KRL code:
This takes the form of new (sub-)section types that contain named extensions. These may be flagged as "critical" which causes the KRL parser to treat them as mandatory-to implement. If they aren't flagged as critical then they are ignored.
Unfortunately KRLs with extensions are not backwards-compatible, as the parser treats unknown section types as a fatal error. They are forwards-compatible though. I didn't update the KRL format version because I couldn't see any practical difference between "KRL parsing fails because of an unknown section type" and "KRL parsing fails because the format version is wrong".
This simplifies and splits the KRL parsing logic into three phases: signature verification, key trust verification and everything else. The idea is to make this easier to read and verify, but also to allow reuse of the first two steps in other contexts (e.g. a KRL parser that just tests a single key, instead of trying to load the whole KRL into RAM).
The KRL format has supported signing of KRLs and verification of KRL signatures for a long time, but there is currently no way to generate a signed KRL or check the signature on one. The final patch hooks this up for
ssh-keygen(1)
at least.