gnutls_ocsp_re...esponder_raw_id(3)

✨ gnutls_ocsp_resp_get_responder_raw_id ✨

okay bestie, so this little icon lives in the gnutls manual (section 3, the library functions section, iykyk), and it's literally an API function. yes, the header at the top of the page said gnutls_ocsp_re...esponder_raw_id(3) because apparently even the manpage title got tired halfway through typing, but we move πŸ’…


🌸 SYNOPSIS 🌸

#include <gnutls/ocsp.h>

int gnutls_ocsp_resp_get_responder_raw_id(gnutls_ocsp_resp_const_t resp,
                                          unsigned type,
                                          gnutls_datum_t * raw);

there she is. three args, one int, zero drama. πŸŽ€


πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_ocsp_resp_const_t resp β€” should contain a gnutls_ocsp_resp_t type. like, this is the OCSP response you're interrogating bestie, hand her over 🫢
  • unsigned type β€” should be GNUTLS_OCSP_RESP_ID_KEY or GNUTLS_OCSP_RESP_ID_DN. those are literally the only two moods, pick one ✨
  • gnutls_datum_t * raw β€” a newly allocated buffer with the raw ID. brand new, fresh out the allocator, no cap πŸ’–

πŸ’œ DESCRIPTION πŸ’œ

so what does this function actually do? it will extract the raw key (or DN) ID of the Basic OCSP Response and drop it into the buffer you provided. main character extraction behavior, honestly πŸ‘‘

⚠️ heads up bestie: if the responder ID is not a key ID, then this function will return GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE. it's giving "sorry girl, wrong kind of ID, nothing here for you" 😭

and now the part everyone forgets and then leaks memory about β€” the caller needs to deallocate memory by calling gnutls_free() on dn ->data. yes, you, the caller, are responsible. it's not gonna free itself. don't leave her hanging πŸ™ˆ


⭐ RETURNS ⭐

On success, GNUTLS_E_SUCCESS (0) is returned, otherwise a negative error code is returned. zero equals slay, negative equals not slay, that's the whole vibe check 🌈


πŸ“ REPORTING BUGS πŸ“

found a bug? not the vibe, but okay, tell the devs:


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, share it, remix it, print it on a tote bag, just keep the receipts bestie πŸ’…


🧚 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/

go read it, it's the extended universe lore fr fr πŸ“šβœ¨


and that's the whole page, periodt. this one came from gnutls 3.8.13 β€” shoutout to the gnutls girlies who keep the docs cute and the APIs honest. mwah, go free your buffers πŸ’–πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from