PKCS7_GET_SIGNER_INFO(3)

πŸ“¦ version 4.1.0, in opensuse-leap 16.0

πŸ’… PKCS7_GET_SIGNER_INFO πŸ’…

ok so real talk, this page is in the Library Functions Manual and the function is PKCS7_get_signer_info. Bestie, it's giving "let me see who signed this" energy and honestly? iconic.


✨ SYNOPSIS ✨

#include <openssl/pkcs7.h>

STACK_OF(PKCS7_SIGNER_INFO) *
PKCS7_get_signer_info(PKCS7 *p7);

like, you hand it a PKCS7 * and it hands you back a whole stack of signer info. periodt. πŸŽ€


🌸 DESCRIPTION 🌸

So what does it do? It grabs the set of SignerInfo structures out of the signerInfos field of p7. That's it. That's the whole vibe. πŸ¦‹

And once you have them? You can literally go manipulate them with the functions documented in PKCS7_add_attribute(3). lowkey obsessed with the pipeline here β€” grab the signer infos, then go poke at their attributes. main character workflow fr fr. πŸ’–


πŸ”₯ RETURN VALUES πŸ”₯

PKCS7_get_signer_info() returns an internal pointer to a STACK_OF(PKCS7_SIGNER_INFO) object, or NULL on failure. ngl, remember that it's internal β€” that detail is doing a lot of work. πŸ‘‘

It fails if:

  • p7 is NULL (like, nothing there bestie)
  • it has no content
  • it's of a type other than SignedData or SignedAndEnvelopedData 😭
so if you're passing in some random other type and wondering why you got NULL back… yeah, that's why. vibe check failed. πŸ’€

πŸ’œ SEE ALSO πŸ’œ

go read them, iykyk 🧚


⭐ HISTORY ⭐

PKCS7_get_signer_info() first appeared in SSLeay 0.8.1 and has been available since OpenBSD 2.4. like, this function has been around longer than most of us, respectfully. 🫢


and that's the whole page!! mwah πŸ’…βœ¨ this one came from the Debian edition, dated June 10, 2020 β€” shoutout to the packagers, they ate and left no crumbs πŸ“πŸŒˆ

πŸ“¦ where this page comes from