GNUTLS_X509_CRT_GET_ISSUER_UNIQUE_ID(3)

πŸ’– gnutls_x509_crt_get_issuer_unique_id πŸ’–

okay bestie, so this one lives in the gnutls manual, section 3, and it's lowkey iconic. it's called gnutls_x509_crt_get_issuer_unique_id and it's literally just "hey, hand me that cert's issuerUniqueID please." that's the whole vibe. ✨


✨ NAME ✨

gnutls_x509_crt_get_issuer_unique_id β€” API function πŸŽ€


🌸 SYNOPSIS 🌸

#include <gnutls/x509.h>

int gnutls_x509_crt_get_issuer_unique_id(gnutls_x509_crt_t crt, char *
buf, size_t * buf_size);

no cap, that's the whole signature. slay. πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_x509_crt_t crt β€” bestie this is the certificate you're holding. the one we're snooping on. 🫢
  • char * buf β€” user allocated memory buffer, and it's gonna hold the unique id. you allocate it, it fills it. teamwork. ✨
  • size_t * buf_size β€” size of the user allocated memory buffer on input, and on return it holds the actual size of the unique ID. so it's giving "two jobs, one pointer" energy. πŸ’€

πŸ‘‘ DESCRIPTION πŸ‘‘

This function will extract the issuerUniqueID value (if present) for the given certificate. note the "if present" β€” sometimes it's just not there, and that's okay, we don't shame. πŸ™ˆ

If the user allocated memory buffer is not large enough to hold the full subjectUniqueID, then a GNUTLS_E_SHORT_MEMORY_BUFFER error will be returned, and buf_size will be set to the actual length. so it's not a fail-fail, it's more like a "bestie your bag is too small, here's the real size, come back." πŸŽ€

⚠️ okay this part is important, listen up: this function had a bug prior to 3.4.8 that prevented the setting of NULL buf to discover the buf_size. To use this function safely with the older versions the buf must be a valid buffer that can hold at least a single byte if buf_size is zero. like, literally at least one byte. do not skip this. i'm so serious. πŸ’€

🌈 RETURNS 🌈

GNUTLS_E_SUCCESS on success, otherwise a negative error code. so like, if it's negative, that's your villain arc moment and you should go read the error. ⭐


⭐ SINCE ⭐

2.12.0 β€” old money, honestly. been here since forever. πŸ‘‘


πŸ’œ REPORTING BUGS πŸ’œ

Report bugs to <bugs@gnutls.org>. Home page: https://www.gnutls.org

(they wanna hear from you, bestie, so tell them. kindly. 🫢)


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 πŸ’– this came to you from gnutls version 3.8.13, and honestly? obsessed. go forth and get that issuer unique id. mwah. πŸ’…βœ¨

πŸ“¦ where this page comes from