PKCS7_GET_SIGNER_INFO(3)

πŸ“¦ version 4.4.0, in alpine 3.24, arch rolling

πŸ’… PKCS7_GET_SIGNER_INFO πŸ’…

okay bestie, so we're in the <openssl/pkcs7.h>-iverse again, and this one lives in the libcrypto library β€” she's a whole manual page in the Library Functions Manual section, and honestly? iconic behavior from her.


✨ NAME ✨

PKCS7_get_signer_info β€” the girl whose entire job is retrieving signerInfos out of a SignedData object. that's it. that's the gig. πŸŽ€


🫢 SYNOPSIS 🫢

first up, you gotta bring the library and the header along, no cap:

library β€œlibcrypto”
#include <openssl/pkcs7.h>

then the function herself:

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

she takes one PKCS7 *p7 and hands you back a STACK_OF(PKCS7_SIGNER_INFO) *. simple. clean. main character energy. ✨


🌸 DESCRIPTION 🌸

so what does she actually do? she reaches into p7 and pulls out the set of SignerInfo structures sitting in the signerInfos field. literally just grabbing them for you. πŸ’–

and once you have them? you can manipulate them with the functions documented over in PKCS7_add_attribute(3). the way that's your next stop, iykyk. πŸ¦‹


πŸ”₯ RETURN VALUES πŸ”₯

she returns an internal pointer to a STACK_OF(PKCS7_SIGNER_INFO) object β€” note that word internal, bestie, she's not making you a fresh copy, she's handing you the house keys 🏠 β€” or NULL on failure.

and she fails when:

  • p7 is NULL 😭
  • it has no content πŸ’€
  • it's of a type other than SignedData or SignedAndEnvelopedData πŸ™ˆ

so yeah, vibe check your p7 before you come for her. ⭐


πŸ‘‘ SEE ALSO πŸ‘‘

go read these, they're all part of the same friend group:


🌈 HISTORY 🌈

PKCS7_get_signer_info() first appeared in SSLeay 0.8.1 and has been available since OpenBSD 2.4. an elder. a legend. she's been serving since before most of us could read. πŸ‘‘


okay that's the whole page, periodt. πŸ’… this cutie is brought to you by the Debian edition, dated June 8, 2025 β€” go drink some water and go call your PKCS7 functions responsibly, bestie πŸ«ΆπŸ’œ

πŸ“¦ where this page comes from