gnutls_x509_crt_list_import_url(3)
π gnutls_x509_crt_list_import_url(3) β the gnutls manual π
okay bestie, sit down, we're doing PKCS11 certificate chain imports and honestly? it's giving β¨main character energyβ¨
πΈ NAME πΈ
gnutls_x509_crt_list_import_url β an API function, and yes it does exactly what it says on the tin π
π¦ SYNOPSIS π¦
#include <gnutls/x509.h>
int gnutls_x509_crt_list_import_url(gnutls_x509_crt_t ** certs, unsigned
int * size, const char * url, gnutls_pin_callback_t pin_fn, void *
pin_fn_userdata, unsigned int flags);
look at that signature. six whole parameters. she's thriving π
π ARGUMENTS π
gnutls_x509_crt_t ** certsβ bestie this is where the allocated certificate list is gonna live when we're done. she gets filled in, you don't fill her. π«Άunsigned int * sizeβ and this one is gonna hold the size of the list. so you know how many you got. iconic.const char * urlβ a PKCS 11 url. that's the vibe. π₯gnutls_pin_callback_t pin_fnβ a PIN callback, but only if one isn't already globally set. iykyk πvoid * pin_fn_userdataβ the parameter you pass along for the PIN callback. give her something to work with. πunsigned int flagsβ one of theGNUTLS_PKCS11_OBJ_*flags for PKCS11 URLs, or just zero otherwise. no cap.
β¨ DESCRIPTION β¨
okay so here's the tea: this function imports a certificate chain that's chilling inside a PKCS11 token β or honestly any type of back-end that supports URLs, we're not gatekeeping π¦
β οΈ BIG IMPORTANT ONE, bestie: the certificates must be deinitialized afterwards usinggnutls_x509_crt_deinit()and the returned pointer must be freed usinggnutls_free(). do not skip this. do not forget this. this is the part where you either slay or you leak memory and cry. π
and the URI you provide must be the first certificate in the chain. the subsequent certificates get retrieved using gnutls_pkcs11_get_raw_issuer() or equivalent functionality for whatever URI type you're working with. she starts at the front and walks the whole chain, periodt. π
β RETURNS β
on success you get GNUTLS_E_SUCCESS (0) back π otherwise it's a negative error value and you should go read the error. ngl the negative ones are always the ones you actually care about.
π SINCE π
3.6.3 β a vintage. an old queen. respect her. π
π REPORTING BUGS π
found a bug? do NOT suffer in silence, tell the people:
- 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. so like, go off, but 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/
that's the mothership. go there. she has everything. π
and that's the whole page, bestie!! this was the gnutls manual, page for gnutls_x509_crt_list_import_url, brought to you by gnutls 3.8.13. now go deinit your certs. i'm literally begging. π«Άπβ¨
π¦ 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