Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KRL extensions and signing #19

Closed
wants to merge 3 commits into from
Closed

KRL extensions and signing #19

wants to merge 3 commits into from

Conversation

djmdjm
Copy link
Owner

@djmdjm djmdjm commented Jan 16, 2023

This changeset contains three patches for the OpenSSH KRL code:

  1. Define and implement an extension mechanism for KRLs.

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".

  1. Refactor KRL verification

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).

  1. Plumb up signing and verification for KRLs.

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.

Defines KRL extension sections that may be marked optional or mandatory
for support. Will allow graceful extension of the format in the future.
factor out signature verification and trusted key checking into
separate functions.
@djmdjm djmdjm closed this Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant