GNUTLS_PCERT_LIST_IMPORT_X509_RAW(3)
β¨ gnutls_pcert_list_import_x509_raw β¨
okay bestie, gather round, because we're about to get into the gnutls manual (yes, that gnutls, the GNU TLS library, we're literally in the big leagues π
) and this one is a banger. It's an API function. It's giving "I import your certificates and I look cute doing it". Let's go π¦
πΈ NAME πΈ
gnutls_pcert_list_import_x509_raw β it's an API function, periodt.
π SYNOPSIS π
#include <gnutls/abstract.h>
int gnutls_pcert_list_import_x509_raw(gnutls_pcert_st * pcert_list,
unsigned int * pcert_list_size, const gnutls_datum_t * data,
gnutls_x509_crt_fmt_t format, unsigned int flags);
π ARGUMENTS π
gnutls_pcert_st * pcert_listβ these are the structures where the certs are gonna live. and like, must not already contain initializedgnutls_pcert_ststructures, ok? don't bring pre-loaded baggage to this function, it's not that kind of party πunsigned int * pcert_list_sizeβ at first this has to hold the maximum number of certs. then it gets updated with the number of certs that are actually available. so it's an in-and-out situation, she changes on the way through β¨const gnutls_datum_t * dataβ the certificates themselves. the main characters πgnutls_x509_crt_fmt_t formatβ one ofDERorPEM. pick your fighter, no third option bestie πunsigned int flagsβ must be(0)or an OR'd sequence ofgnutls_certificate_import_flags. that's it, that's the whole rule π«Ά
π DESCRIPTION π
so basically, this function imports the DER or PEM encoded certificates you hand it into an already allocated set of gnutls_pcert_st structures. key word: already allocated. she does not allocate for you, she fills in what you gave her, ok? π
and the way that you must deinitialize those structures afterwards using gnutls_pcert_deinit()... yeah, no skipping that step, that's the cleanup era and we respect it π§
also, pcert_list should contain space for at least pcert_list_size elements. lowkey important. highkey important actually.
if the certificate is PEM encoded, it should have a header of "X509 CERTIFICATE", or "CERTIFICATE". those exact strings, don't get creative with the header, she's picky π
β RETURNS β
on success, GNUTLS_E_SUCCESS (0) is returned π otherwise you get a negative error value. and if the pcert list doesn't have enough space, GNUTLS_E_SHORT_MEMORY_BUFFER will be returned β that's your cue that you under-allocated, bestie, size up π
π¦ SINCE π¦
3.0 β she's been iconic for a minute, no cap.
π REPORTING BUGS π
found a bug? not the vibe. report it to <bugs@gnutls.org> and they'll handle it π«Ά
home page is over at https://www.gnutls.org β go say hi.
π 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/
that's the mothership, that's where all the lore lives πβ¨
and that's the whole page bestie, every option, every return code, every string, all of it, untouched. slay π
okay bye ily, this was gnutls version 3.8.13 from the gnutls_pcert_list_import_x509_raw(3) manual page, 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