gnutls_ocsp_req_get_nonce(3)

πŸ’– gnutls_ocsp_req_get_nonce β€” the manual page, but make it make sense πŸ’–

okay bestie, so this is a page from the gnutls manual set, and today's main character is gnutls_ocsp_req_get_nonce, which is, like, an API function. that's the whole NAME situation. she's a function. she gets nonces. slay. ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <gnutls/ocsp.h>

int gnutls_ocsp_req_get_nonce(gnutls_ocsp_req_const_t req, unsigned int
* critical, gnutls_datum_t * nonce);

literally just include the header and call her. that's the vibe. πŸ’…


🌸 ARGUMENTS 🌸

here's who's showing up to the function call, and what they're bringing:

  • gnutls_ocsp_req_const_t req β€” ngl this one should contain a gnutls_ocsp_req_t type. like, that's her whole job. she's the request you're pulling the nonce out of. πŸ‘‘
  • unsigned int * critical β€” this tells you whether the nonce extension is marked critical. it can also just be NULL, if you don't care about that level of detail. no pressure, bestie. πŸ™ˆ
  • gnutls_datum_t * nonce β€” okay so this one is gonna hold a newly allocated buffer with the nonce data in it. freshly allocated. brand new. she ate. πŸŽ€

✨ DESCRIPTION ✨

so what does she actually do? this function returns the OCSP request nonce extension data. that's it, that's the plot. short and iconic. πŸ’œ

⚠️ important, don't skip this one: the caller needs to deallocate the memory by calling gnutls_free() on nonce->data. yes, you. the function is not gonna clean up after herself. if you forget, that memory is just… sitting there. forever. leaking. not the vibe. 😭

🌈 RETURNS 🌈

  • on success, GNUTLS_E_SUCCESS (0) is returned 🫢
  • otherwise, a negative error code comes back at you πŸ’€

that's it. zero means we're good. negative means go read the error code and handle your business.


πŸ› REPORTING BUGS πŸ›

found something cursed? report bugs to <bugs@gnutls.org>.

home page is over at https://www.gnutls.org 🌐


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/


and that's the whole page, bestie!! this was pulled from gnutls version 3.8.13, and yeah the page title was gnutls_ocsp_req_get_nonce(3) β€” you already knew that tho, iykyk. go free your nonce. gnutls_free() her. love u, bye πŸ’–βœ¨

πŸ“¦ where this page comes from