gnutls_ocsp_st...uest_is_checked(3)

πŸ’… gnutls_ocsp_status_request_is_checked β€” a whole manual page, bestie

okay so we're in the gnutls manual (yes, that gnutls) and today's main character is gnutls_ocsp_status_request_is_checked(3). it's an API function. she's a helper. she's lowkey iconic. let's get into it πŸŽ€


✨ NAME ✨

gnutls_ocsp_status_request_is_checked β€” API function πŸ’–


🌸 SYNOPSIS 🌸

#include <gnutls/gnutls.h>

unsigned gnutls_ocsp_status_request_is_checked(gnutls_session_t session,
unsigned int flags);

πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_session_t session β€” bestie. it's a gnutls session. that's the vibe. πŸ’œ
  • unsigned int flags β€” should be zero, or GNUTLS_OCSP_SR_IS_AVAIL. pick one, queen, no in-between. ✨

πŸ‘‘ DESCRIPTION πŸ‘‘

so when flags are zero, this function returns non-zero if a valid OCSP status response was included in the TLS handshake. and what counts as valid, you ask? one that is not too old, not superseded, and not marking the certificate as revoked. if it doesn't pass that vibe check, you get zero back. periodt. πŸ’…

when the flag GNUTLS_OCSP_SR_IS_AVAIL is specified, the function returns non-zero if an OCSP status response was included in the handshake even if it was invalid. like, she showed up, she counts. otherwise, if no OCSP status response was included at all, it returns zero. the GNUTLS_OCSP_SR_IS_AVAIL flag was introduced in GnuTLS 3.4.0, for the record. πŸ—“οΈβœ¨

this is a helper function for when you need to decide whether to perform an explicit OCSP validity check on the peer's certificate. and you should call it after any of gnutls_certificate_verify_peers*() are called. order matters, bestie, don't skip steps. 😭

also!! this function is always usable on client side, but on server side only under TLS 1.3 β€” which is the first version of TLS that allows clients to send OCSP responses. server girlies, know your limits. 🌈

⭐ RETURNS ⭐

Non-zero if the response was valid. zero if it wasn't sent, or if it was sent and was invalid. simple as. 🫢


πŸŽ€ SINCE πŸŽ€

3.1.4 β€” she's been around. legacy queen. πŸ‘‘


πŸ™ˆ REPORTING BUGS πŸ™ˆ

found a bug? don't be shy, 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.

(no cap, that's genuinely generous of them πŸ₯Ή)


🧚 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!! go forth and check those OCSP status requests responsibly πŸ’œβœ¨

this has been the gnutls manual, version 3.8.13, page gnutls_ocsp_st...uest_is_checked(3) β€” mwah, slay, bye!! πŸ’…πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from