restrict_link_by_digsig(9)
π restrict_link_by_digsig β the manual page, but make it make sense
okay so bestie, you clicked on restrict_link_by_digsig from the Kernel API Manual and honestly? you're about to understand keyrings better than half the people who wrote them. this is the vibe: it's a function that decides who gets to join the group chat (the keyring) based on whether their ID card has the right sticker on it. let's go π
β¨ NAME β¨
restrict_link_by_digsig β the bouncer at the door of a ring of digsig keys. restricts additions to that ring, no cap. π₯
β¨ SYNOPSIS β¨
int restrict_link_by_digsig (struct key *dest_keyring , const struct
key_type *type , const union key_payload *payload , struct key
*trust_keyring );
literally the whole signature, character for character, don't @ me π
β¨ ARGUMENTS β¨
dest_keyringβ the keyring being linked to. this is the group chat we're trying to add somebody to π«Άtypeβ the type of key being added. what kind of member is this, bestiepayloadβ the payload of the new key. the actual content, the main character energy β¨trust_keyringβ a ring of keys that can be used to vouch for the new cert. these are the references we call, iykyk π
β¨ DESCRIPTION β¨
so here's the whole plan, and it's giving very methodical:
First, check if the new certificate has digitalSignature usage set. if it does, then mark the new certificate as being ok to link. iconic, honestly π¦
Afterwards, verify the new certificate against the ones in the trust_keyring. like, the new cert said it's cool, but do the trusted friends actually recognise it? that's the vibe check.
Now for the return values, bestie β read these carefully, this is the important part πΈ:
- Returns
0if the new certificate was accepted. slay, they're in π -ENOKEYif the certificate is not a digsig. not the right kind of key, sorry bestie π-ENOPKGif the signature uses unsupported crypto. like, we literally don't have the package for that, can't help you π§- or some other error if there is a matching certificate but the signature check cannot be performed. so close and yet so far π
ngl, "some other error" is the most ominous vibe in this whole page β if you hit that branch, the cert matched but the check itself couldn't run. don't assume it's a yes. π
β¨ SEE ALSO β¨
- Kernel file
./crypto/asymmetric_keys/restrict.cβ the source, go read it, it's right there π restrict_link_by_signature(9)β the sibling, also restricted, also valid πrestrict_link_by_ca(9)β ca-flavoured restriction, very demure βrestrict_link_by_key_or_keyring(9)β key or keyring, best of both πrestrict_link_by_key_or_keyring_chain(9)β same but with chain energy π
and that's the whole page, no notes π
this little cutie lives in ./crypto/asymmetric_keys, and the source/version line says October 2026 β so mark your calendar, she's from the future πβ¨ stay restricted, stay iconic, periodt. π«Ά
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms