gnutls_ocsp_resp_get_nonce(3)

πŸ’… gnutls_ocsp_resp_get_nonce β€” the gnutls manual, bestie edition ✨

okay so picture this: you're deep in the gnutls man pages (iconic behavior, love that for you) and you land on gnutls_ocsp_resp_get_nonce(3). It's an API function. It's giving "quietly essential". Let's get into it πŸŽ€


✨ SYNOPSIS ✨

#include <gnutls/ocsp.h>

int gnutls_ocsp_resp_get_nonce(gnutls_ocsp_resp_const_t resp, unsigned
       int * critical, gnutls_datum_t * nonce);

like, she's a whole function and she takes three things. slay πŸ’–


🫢 ARGUMENTS 🫢

  • gnutls_ocsp_resp_const_t resp β€” this one should contain a gnutls_ocsp_resp_t type. that's the whole vibe, no notes.
  • unsigned int * critical β€” tells you whether the nonce extension is marked critical. yes, that's literally what it's for 🌸
  • gnutls_datum_t * nonce β€” this bad boy will hold a newly allocated buffer with the nonce data. fresh out of the oven, not yours yet, we'll get to that πŸ‘‘

🌈 DESCRIPTION 🌈

This function will return the Basic OCSP Response nonce extension data. that's it, that's the job, and she does it well πŸ’…

now the important part, bestie, listen up: the caller needs to deallocate memory by calling gnutls_free() on nonce->data.

🚨 not me letting you leak memory... free it with gnutls_free() on nonce->data or the vibe check will fail. no cap.

⭐ RETURNS ⭐

On success, GNUTLS_E_SUCCESS (0) is returned, otherwise a negative error code is returned. so like, zero is the good one here. don't panic when you see a 0, that's the win πŸ†


😭 REPORTING BUGS 😭

Found something cursed? Report bugs to <bugs@gnutls.org>.

Home page: https://www.gnutls.org

they're genuinely lovely, they wanna hear from you 🫢


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.

(that's the legal text, verbatim, because we respect the paperwork in this house πŸ’œ)


πŸ¦‹ 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, that's where the lore lives πŸ“šβœ¨


and that's the whole page, bestie!! this lil masterpiece comes to you from gnutls version 3.8.13, and the page itself is gnutls_ocsp_resp_get_nonce(3). go forth, grab that nonce, free your buffer, main character energy only πŸŒΈπŸ’–πŸŽ€

πŸ“¦ where this page comes from