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 agnutls_pkcs7_ttype. 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 π
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:NULLon error,NULLwhen there's no embedded data β and the pointer is only good while thepkcs7structure 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
- alpine 3.22: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.23: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.24: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- arch rolling: gnutls 3.8.13-3 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- ubuntu stonking: gnutls-doc 3.8.13-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms