restrict_li...eyring_chain(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay bestie, welcome to the restrict_li...eyring_chain(9) page from the Kernel API Manual πŸ’…βœ¨ this one is all about restricting additions to a ring of public keys, and yes it's giving kernel-keyring security realness πŸ”πŸ¦‹

🌸 NAME 🌸

restrict_link_by_key_or_keyring_chain β€” restrict additions to a ring of public keys using the restrict_key information stored in the ring. periodt πŸ’–


✨ SYNOPSIS ✨

int restrict_link_by_key_or_keyring_chain (struct key *dest_keyring ,
const struct key_type *type , const union key_payload *payload , struct
key *trusted );

πŸŽ€ ARGUMENTS πŸŽ€

  • dest_keyring β€” the keyring being linked to, bestie πŸ’«
  • type β€” the type of key being added πŸ‘‘
  • payload β€” the payload of the new key πŸ“
  • trusted β€” a key or ring of keys that can be used to vouch for the new cert 🫢

πŸ’œ DESCRIPTION πŸ’œ

so here's the vibe: it checks the new certificate against the key or keys passed in the data parameter, and also against the keys already linked to the destination keyring πŸ”βœ¨ if one of those is the signing key and validates the new certificate, then it marks the new certificate as being ok to link πŸ’…βœ…

and the returns are literally:

  • 0 if the new certificate was accepted πŸŽ‰
  • -ENOKEY if we couldn't find a matching parent certificate in the trusted list 😭
  • -EKEYREJECTED if the signature check fails πŸ’€
  • -ENOPKG if the signature uses unsupported crypto πŸ™ˆ
  • or some other error if there is a matching certificate but the signature check cannot be performed 🫠

🌈 SEE ALSO 🌈


mwah πŸ’– this slay little page comes from ./crypto/asymmetric_keys, dated October 2026, and it's literally the restrict_li...eyring_chain(9) page β€” no cap, that's the sign-off πŸŽ€πŸ’«

πŸ“¦ where this page comes from