gnutls_pkcs7_get_crt_count(3)

πŸ’– gnutls_pkcs7_get_crt_count β€” the gnutls girlies' guide πŸ’–

okay bestie, welcome to the gnutls manual, section 3, and today's main character is a lil function that just... counts certificates for you. no cap. let's get into it πŸ¦‹


✨ NAME ✨

gnutls_pkcs7_get_crt_count β€” it's an API function, and its whole vibe is counting. that's it. that's the job. πŸ’…


🌸 SYNOPSIS 🌸

#include <gnutls/pkcs7.h>

int gnutls_pkcs7_get_crt_count(gnutls_pkcs7_t pkcs7);

like, look at her. one include, one function, zero drama. πŸŽ€


🫢 ARGUMENTS 🫢

  • gnutls_pkcs7_t pkcs7 β€” bestie, this one should contain a gnutls_pkcs7_t type. that's the whole assignment. it's the thing you're counting the certs in, so pls make sure it's actually that type and not, like, a random void pointer you found on the floor. πŸ™ˆ

πŸ‘‘ DESCRIPTION πŸ‘‘

so what does she actually do?? this function will return the number of certificates in the PKCS7 or RFC2630 certificate set. that's it!! that's the tea!! you hand her a PKCS7 thing, she tells you how many certs are chilling inside it. lowkey the most useful girl in the whole header file. ⭐


πŸ”₯ RETURNS πŸ”₯

  • on success, a positive number is returned (yay, certs!! πŸŽ‰)
  • otherwise, a negative error value (😭 not the vibe, go check your error handling bestie)
fr fr: negative means something went wrong, so don't just slap this in a for loop without checking. iykyk. πŸ’€

πŸ› REPORTING BUGS πŸ›

found a bug? not on my watch. report that thing:


Copyright Β© 2001-2023 Free Software Foundation, Inc., and others.

Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved.

(translation: you can share this file, just keep the receipts. iconic behavior honestly. πŸ‘‘)


🌈 SEE ALSO 🌈

the full documentation for gnutls is maintained as a Texinfo manual. if the /usr/share/doc/gnutls/ directory does not contain the HTML form, go visit:

https://www.gnutls.org/manual/

like, the whole lore is right there. go read it. it's giving educational. 🧚


mwah πŸ’‹ that's the page!! this was gnutls, version 3.8.13, and yes this manpage really is titled gnutls_pkcs7_get_crt_count(3) β€” go count some certs, bestie, you've got this πŸ¦‹βœ¨

πŸ“¦ where this page comes from