GNUTLS_X509_CRQ_GET_ATTRIBUTE_BY_OID(3)

✨ gnutls_x509_crq_get_attribute_by_oid β€” API function ✨

okay bestie, this one lives in the gnutls manual pages, and it's all about pulling attribute data out of a certificate request πŸ’– like it's a lil treasure hunt but for DER-encoded bytes. no cap.


🌸 SYNOPSIS 🌸

#include <gnutls/x509.h>

int gnutls_x509_crq_get_attribute_by_oid(gnutls_x509_crq_t crq, const
                                         char * oid, unsigned indx, void * buf,
                                         size_t * buf_size);

πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_x509_crq_t crq β€” should contain a gnutls_x509_crq_t type. that's the whole vibe, it's the cert request you're digging through πŸ¦‹
  • const char * oid β€” holds an Object Identifier in null-terminated string. yes bestie, a string, terminated by null, as the universe intended ✨
  • unsigned indx β€” In case multiple same OIDs exist in the attribute list, this specifies which to get, use (0) to get the first one. so like, if there's a whole squad of identical OIDs, 0 gets you the first one in line πŸ‘‘
  • void * buf β€” a pointer to a structure to hold the attribute data (may be NULL). it can absolutely be NULL, she's flexible πŸ’…
  • size_t * buf_size β€” initially holds the size of buf. important: initially, so you tell her how big your buffer is first, got it? 🌸

πŸ’œ DESCRIPTION πŸ’œ

This function will return the attribute in the certificate request specified by the given Object ID. The attribute will be DER encoded β€” that's the format, no substitutions, periodt πŸ”₯

Attributes in a certificate request is an optional set of data appended to the request. Their interpretation depends on the CA policy. so basically: they're optional lil extras tacked onto the request, and what they actually mean is up to whatever the CA decided. iykyk πŸ™ˆ


⭐ RETURNS ⭐

On success, GNUTLS_E_SUCCESS (0) is returned, otherwise a negative error value. zero means slay, negative means something went sideways 😭


🫢 REPORTING BUGS 🫢

Found something cursed? Report bugs to <bugs@gnutls.org>.

Home page: 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.


🧚 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/


and that's the whole page bestie, every single flag and fact intact, nothing skipped, we ate πŸ’…βœ¨

this was page gnutls_x509_crq_get_attribute_by_oid(3) from gnutls 3.8.13 β€” go read the Texinfo manual if you want more, love u bye πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from