gnutls_x509_cr...bject_unique_id(3)
π gnutls_x509_crt_get_subject_unique_id(3) π
okay bestie, gather round π«Ά this one lives in the gnutls manual (section 3, the library-functions girlies), and it's literally all about pulling one specific lil value out of a certificate. no cap.
β¨ NAME β¨
gnutls_x509_crt_get_subject_unique_id β and yes it's an API function, we're fancy here π
πΈ SYNOPSIS πΈ
#include <gnutls/x509.h>
int gnutls_x509_crt_get_subject_unique_id(gnutls_x509_crt_t crt, char *
buf, size_t * buf_size);
π ARGUMENTS π
gnutls_x509_crt_t crtβ this is the certificate, she's holding the whole vibe β¨char * bufβ a memory buffer that you allocated, bestie. it's gonna hold the unique id when we're done with it.size_t * buf_sizeβ on the way in, this is how big your buffer is. on the way out? it's holding the actual size of the unique ID. it's giving "before and after" fr fr.
π¦ DESCRIPTION π¦
so what this function does is extract the subjectUniqueID value (if it's even there π) for the certificate you handed it. that's it. that's the whole job. iconic.
now, if your user-allocated buffer is not large enough to hold the full subjectUniqueID, you're gonna get a GNUTLS_E_SHORT_MEMORY_BUFFER error back. but it's not a total loss because buf_size gets set to the actual length, so you know exactly how much room to make next time π
β οΈ okay important lore time: this function had a bug prior to 3.4.8 that prevented the setting ofNULLbufto discover thebuf_size. so if you're out here using it safely with the older versions,bufhas to be a valid buffer that can hold at least a single byte ifbuf_sizeis zero. like. one (1) byte minimum. don't skip that or you're gonna have a bad time π
β RETURNS β
GNUTLS_E_SUCCESS on success π β otherwise a negative error code, which is the universe's way of saying "not today, babe" π
π REPORTING BUGS π
found a bug? spill it to <bugs@gnutls.org> π«Ά
home page: 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. (so like, go off, just keep the receipts β¨)
π 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, ate and left no crumbs π
this was gnutls 3.8.13, page gnutls_x509_cr...bject_unique_id(3), mwah π
π¦ 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