gnutls_pkcs7_get_crt_raw(3)
β¨ gnutls_pkcs7_get_crt_raw β¨
okay bestie, welcome to the gnutls manual page for gnutls_pkcs7_get_crt_raw(3) β yes the whole thing lives in section 3 of the gnutls manual and it is so ready for u π
πΈ NAME πΈ
gnutls_pkcs7_get_crt_raw β it's an API function, periodt π
π SYNOPSIS π
#include <gnutls/pkcs7.h>
int gnutls_pkcs7_get_crt_raw(gnutls_pkcs7_t pkcs7, unsigned indx, void *
certificate, size_t * certificate_size);
like. look at her. iconic signature fr fr π¦
π ARGUMENTS π
gnutls_pkcs7_t pkcs7β bestie this one should contain agnutls_pkcs7_ttype. that's the whole vibe. πunsigned indxβ this holds the index of the certificate u wanna extract, so like, which one are we pulling out π«Άvoid * certificateβ the contents of the certificate get copied right there into this bad boy (and yes, it may be null, no stress) β¨size_t * certificate_sizeβ this one should hold the size of the certificate, so keep it fed and happy π
π DESCRIPTION π
so basically?? this function will return a certificate of the PKCS7 or RFC2630 certificate set. that's it, that's the gig π
and here's the lil plot twist: after the last certificate has been read, GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE will be returned. so when u hit that error, it's not a crisis, it's literally just the end of the list saying "that's all bestie, we're done here" πβ¨
β RETURNS β
on success, GNUTLS_E_SUCCESS (0) is returned, slay. otherwise u get a negative error value, sad but survivable π
and ooooh important one: if the provided buffer is not long enough, then certificate_size is updated and GNUTLS_E_SHORT_MEMORY_BUFFER is returned. so like, she's telling u how much room she actually needs β read the number, grow ur buffer, try again, main character energy π
π REPORTING BUGS π
found a bug? don't be shy, 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. (yes u can share it, just keep the receipts, no cap π )
π₯ 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/
ngl if u read all the way down here u are genuinely built different π§
okay bye ily, this was gnutls 3.8.13 and this page is gnutls_pkcs7_get_crt_raw(3) β go extract those certificates bestie πβ¨ππ¦πΈ
π¦ 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