GNUTLS_PKCS7_GET_EMBEDDED_DATA_OID(3)

πŸ’– gnutls_pkcs7_get_embedded_data_oid β€” bestie's guide to the PKCS7 embedded-data OID ✨

okay so this one lives in the gnutls manual, section 3, and it's literally called gnutls_pkcs7_get_embedded_data_oid(3). it's an API function, so yes it's for the coders, not the vibe-only girlies. let's get into it πŸŽ€


🌸 SYNOPSIS 🌸

#include <gnutls/pkcs7.h>

const char * gnutls_pkcs7_get_embedded_data_oid(gnutls_pkcs7_t pkcs7);

like, that's the whole signature. short, sweet, iconic πŸ‘‘


πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_pkcs7_t pkcs7 β€” bestie this should contain a gnutls_pkcs7_t type. that's the whole assignment. it's giving "bring your own PKCS7 structure" πŸ’…

✨ DESCRIPTION ✨

so what does this lil function actually do? it will return the OID of the data embedded in the signature of the PKCS7 structure. yes, the actual OID, the whole point, the main character of this story 🌟

if no data are available? then NULL will be returned. no data, no OID, no problem, just a NULL and a little shrug 🫢

and here's the part you need to remember, bestie: the returned value will be valid during the lifetime of the pkcs7 structure. so don't go freeing that structure and then waving the pointer around like it's still yours β€” that's not slay, that's a use-after-free πŸ’€ keep the structure alive, keep the string alive. periodt.


🌈 RETURNS 🌈

on success, a pointer to an OID string. on error, NULL. that's it. that's the return value. ate and left no crumbs ✨


⭐ SINCE ⭐

3.5.5 β€” so this has been around for a minute, it's a classic, lowkey vintage πŸ‘‘


πŸ™ˆ REPORTING BUGS πŸ™ˆ

found a bug? don't be shy, report bugs to <bugs@gnutls.org>.

home page is right here: https://www.gnutls.org


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. fr fr, just keep the notice and you're golden πŸŽ€


🧚 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, visit

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

like, go read the real thing, it's all there πŸ’–


lowkey reminder: NULL on error, NULL when there's no embedded data β€” and the pointer is only good while the pkcs7 structure lives. don't test it. just respect it 🫢

and that's a wrap, bestie πŸ’… this was gnutls_pkcs7_get_embedded_data_oid(3) from gnutls 3.8.13 β€” go forth, grab your OID, and stay hydrated πŸŒΈπŸ¦‹βœ¨

πŸ“¦ where this page comes from