gnutls_x509_tr..._subject_key_id(3)
π gnutls_x509_trust_list_get_issuer_by_subject_key_id π
okay bestie, so this one lives in the gnutls manual, section 3, and it's genuinely one of those little functions that does exactly one thing and does it slay. let's get into it π«Ά
πΈ NAME πΈ
gnutls_x509_trust_list_get_issuer_by_subject_key_id β it's an API function, no cap β¨
π SYNOPSIS π
#include <gnutls/x509.h>
int
gnutls_x509_trust_list_get_issuer_by_subject_key_id(gnutls_x509_trust_list_t
list, const gnutls_datum_t * dn, const gnutls_datum_t * spki,
gnutls_x509_crt_t * issuer, unsigned int flags);
like. look at her. so much type signature. so much gnutls_datum_t energy π
π¦ ARGUMENTS π¦
gnutls_x509_trust_list_t listβ this is the list. the trust list. she's the main character, everything happens inside her.const gnutls_datum_t * dnβ this is the issuer's DN, and lowkey important note: it may beNULL. so it's optional, bestie, she's flexible like that.const gnutls_datum_t * spkiβ this is the subject key ID. this is the thing you're actually hunting for πgnutls_x509_crt_t * issuerβ this pointer will hold the issuer if any. and listen: you have to deallocate it after use. do not just walk away and leave her allocated, that's not the vibe πunsigned int flagsβ literally just use zero. that's it. that's the whole instruction.0. periodt.
β¨ DESCRIPTION β¨
so what does she actually do? she finds the issuer that matches the given name and subject key ID. both. together. iconic behavior honestly.
and then β this is the part that matters β she returns a copy of the issuer. a copy, bestie. which means you own it, and which means you must free it using gnutls_x509_crt_deinit(). if you don't, that's a memory leak and the vibe check will not be passed π
β RETURNS β
on success? you get GNUTLS_E_SUCCESS which is 0 π
otherwise you get a negative error value. negative. sad girl hours. go read your error string π
π SINCE π
3.4.2 β she's been around a minute, she's a legacy icon, respect her π
π REPORTING BUGS π
found a bug? don't be shy, tell the devs:
- Report bugs 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.
(translation: free to share, just keep the receipts, fr fr π«Ά)
π₯ 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 one's from gnutls 3.8.13, manual section 3, and you ate that. go free your issuer with gnutls_x509_crt_deinit() and hydrate. 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