gnutls_x509_crt_get_serial(3)
π gnutls_x509_crt_get_serial π
okay so bestie, welcome to the gnutls manual, and today's main character is gnutls_x509_crt_get_serial β she's an API function and she's here to spill the tea on a cert's serial number. pull up a chair, grab a strawberry π, let's go.
β¨ NAME β¨
gnutls_x509_crt_get_serial β API function π
πΈ SYNOPSIS πΈ
#include <gnutls/x509.h>
int gnutls_x509_crt_get_serial(gnutls_x509_crt_t cert, void * result,
size_t * result_size);
π ARGUMENTS π
gnutls_x509_crt_t certβ this one "should contain agnutls_x509_crt_ttype". like, that's the vibe it needs to have. it's the cert you're interrogating πvoid * resultβ the place where the serial number will be copied. this is where she drops the goods π«Άsize_t * result_sizeβ holds the size of theresultfield. it knows how much room there is β¨
π¦ DESCRIPTION π¦
okay so this function will return the X.509 certificate's serial number. iconic. it's obtained by the X509 Certificate serialNumber field.
and here's the important part, no cap: serial is not always a 32 or 64bit number. some CAs use large serial numbers, so it may be wise to handle it as something uint8_t. like, don't assume it's gonna fit in a cute little int, because she's built different and might be huge ππ
π RETURNS π
on success, GNUTLS_E_SUCCESS (0) is returned. otherwise you get a negative error value and honestly? we don't love that for us. π
π REPORTING BUGS π
found a bug? don't be shy, report 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. periodt. π
β 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 lil beauty lives in gnutls 3.8.13 β yeah, that's the source and version, mwah π go get those serial numbers, you absolute icon π¦β¨π
π¦ 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