find_asymmetric_key(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– find_asymmetric_key(9) β€” the kernel API manual, but make it make sense πŸ’–

okay so bestie, welcome to find_asymmetric_key, a page from the Kernel API Manual (yes, that one, the kernel) ✨ this is the whole vibe: you got a keyring, you got some IDs, and you wanna find the right key. let's GO πŸŽ€


🌸 NAME 🌸

find_asymmetric_key β€” find a key by ID, literally that's it, that's the whole function πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

struct key * find_asymmetric_key (struct key *keyring , const struct
       asymmetric_key_id *id_0 , const struct asymmetric_key_id *id_1 ,
       const struct asymmetric_key_id *id_2 , bool partial );

like, look at all those parameters. she's got range πŸ’œ


✨ ARGUMENTS ✨

  • keyring β€” the keys to search, i.e. your little key stash πŸ‘‘
  • id_0 β€” the first ID to look for, or NULL
  • id_1 β€” the second ID to look for, or NULL, and she gets matched together with id_0 against the keyring keys' id[0] and id[1] 🫢
  • id_2 β€” the fallback ID πŸ“ she matches against the keyring keys' id[2] if both of the other IDs are NULL
  • partial β€” use partial match for id_0 and id_1 if true, exact if false. no cap, that's the whole switch πŸ”₯

πŸ’€ DESCRIPTION πŸ’€

So the assignment is: find a key in the given keyring by identifier. periodt. ✨

The preferred identifier is the id_0 and the fallback identifier is the id_1. If both are given, the former is matched (exactly or partially) against either of the sought key's identifiers and the latter must match the found key's second identifier exactly. ikyk 😭

If both are missing, id_2 must match the sought key's third identifier exactly. that's the rule, bestie, she's strict about it πŸ’…

ngl, the exactness caveat is the main character here β€” id_1 and id_2 don't do partial, they're exact only. don't come for me, that's just what the page says πŸ™ˆ

🌈 SEE ALSO 🌈

go read those too, they're the friend group πŸ§šπŸ’–


and that's the page, bestie!! this one lives in ./crypto/asymmetric_keys, dated October 2026, and we're out here in the Kernel API Manual section 9. slay, bye πŸ‘‘πŸ’…βœ¨

πŸ“¦ where this page comes from