gnutls_ocsp_resp_list_import2(3)

✨ gnutls_ocsp_resp_list_import2(3) ✨

okay bestie, pull up a chair, because we're diving into the gnutls manual and this one's a banger πŸ’– It's gnutls_ocsp_resp_list_import2, she's an API function, and she's here to take a big ol' pile of OCSP responses and make them make sense. Let's get into it πŸ¦‹


🌸 NAME 🌸

gnutls_ocsp_resp_list_import2 β€” literally an API function, no cap πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

#include <gnutls/ocsp.h>

int gnutls_ocsp_resp_list_import2(gnutls_ocsp_resp_t ** ocsps, unsigned
int * size, const gnutls_datum_t * resp_data, gnutls_x509_crt_fmt_t
format, unsigned int flags);

she's giving five arguments and a dream ✨


πŸ’… ARGUMENTS πŸ’…

  • gnutls_ocsp_resp_t ** ocsps β€” this is where the parsed OCSP response list is gonna live. she will hold it, bestie, she's built for this 🫢
  • unsigned int * size β€” and this one? she'll contain the size of the list. the receipts, if you will πŸ“‹
  • const gnutls_datum_t * resp_data β€” the PEM encoded OCSP list. the raw material, the source material, the moment 🌈
  • gnutls_x509_crt_fmt_t format β€” one of GNUTLS_X509_FMT_PEM or GNUTLS_X509_FMT_DER. pick your fighter, no in-between πŸ’€
  • unsigned int flags β€” must be (0) or an OR'd sequence of gnutls_certificate_import_flags. so like, either nothing or a lil combo situation πŸ”₯

🌟 DESCRIPTION 🌟

so this function will convert the given PEM encoded OCSP response list to the native gnutls_ocsp_resp_t format. glow up central ✨ The output will be stored in ocsps, which will be allocated and initialized β€” she's brand new, she's fresh out the box, main character energy fr fr πŸ‘‘

The OCSP responses should have a header of "OCSP RESPONSE". that's the vibe check, and they gotta pass it πŸ’–

okay now listen, this part matters: to deinitialize responses, you need to deinitialize each gnutls_ocsp_resp_t structure independently, and use gnutls_free() at ocsps. not one big cleanup, bestie β€” one by one, individually, no shortcuts πŸ™ˆ

In PEM files, when no OCSP responses are detected, GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE will be returned. not me getting ghosted by the data 😭


⭐ RETURNS ⭐

the number of responses read, or a negative error value. so either a cute lil count or a lil sad negative, and that's just how it is πŸ’œ


πŸ¦‹ SINCE πŸ¦‹

3.6.3 β€” vintage, iconic, been here since forever πŸŽ€


πŸ“ REPORTING BUGS πŸ“

found a bug? spill the tea to <bugs@gnutls.org> πŸ“§

Home page: https://www.gnutls.org β€” the mothership 🌈


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 notice, 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/

iykyk 🧚


and that's the whole page, bestie!! written by the gnutls girlies, version 3.8.13, and yeah this manual page is dated the same era as all her sisters πŸ’– mwah, go import some OCSP responses, you got this 🫢✨

πŸ“¦ where this page comes from