verify_pkcs7_signature(9)
π verify_pkcs7_signature(9) π
okay so bestie, welcome to the Kernel API Manual β this is <pink>verify_pkcs7_signature</pink>, and she is literally the bouncer at the club door of your system data. like, she checks the PKCS#7 signature and is like "hmm, are you on the list tho?" and you better hope your trusted keys say yes πβ¨
πΈ NAME πΈ
verify_pkcs7_signature β verify a PKCS#7-based signature on system data. that's it, that's the vibe check π«Ά
β¨ SYNOPSIS β¨
int verify_pkcs7_signature (const void *data , size_t len , const void
*raw_pkcs7 , size_t pkcs7_len , struct key *trusted_keys , enum
key_being_used_for usage , int (*view_content)(void *ctx, const void
*data, size_t len, size_t asn1hdrlen) , void *ctx );
like, look at all those parameters. main character and her whole entourage π
π ARGUMENTS π
dataβ the data getting verified, bestie. she's the moment. and it'sNULLif you're expecting internal data instead, no cap πlenβ size ofdata. gotta know how much of the good stuff we're working with πraw_pkcs7β the PKCS#7 message that is the signature. yes she's the signature herself, iconic behavior πpkcs7_lenβ the size ofraw_pkcs7. measure twice, verify once β¨trusted_keysβ the trusted keys to use, and listen:NULLmeans builtin trusted keys only, and(void *)1ULmeans all trusted keys. not me memorising that absolute cursed cast(void *)1ULπ it's giving "we ran out of normal values so we used a pointer-shaped number" fr frusageβ the use to which the key is being put. like, what's the key's job today, what's her role in the group chat π₯view_contentβ a callback to gain access to content π¦ it's declared asint (*view_content)(void *ctx, const void *data, size_t len, size_t asn1hdrlen)β so she takesctx,data,len, andasn1hdrlen, and returns anint, periodtctxβ context for the callback. you know, the emotional support parameter every callback deserves π«Ά
π SEE ALSO π
- Kernel file
./certs/system_keyring.cβ go read the source, iykyk π restrict_link_by_builtin_trusted(9)restrict_link_by_digsig_builtin(9)restrict_link_by_builtin_and_secondary_trusted(9)restrict_link_by_digsig_builtin_and_secondary(9)add_to_secondary_keyring(9)restrict_link_by_builtin_secondary_and_machine(9)verify_pkcs7_message_sig(9)
the whole keyring friend group showed up to support her, we love to see it ππ§
real talk though, those names are long. like restrict_link_by_builtin_and_secondary_trusted is a whole sentence with no punctuation. respect for anyone typing that from memory, genuinely π
and that's the page!! brought to you by the fine folks at ./certs, dropping October 2026 β so mark your calendars bestie, this certification era is gonna slay πβπ₯ π
π¦ 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