GNUTLS_CERTIFICATE_GET_OCSP_EXPIRATION(3)

πŸ’– gnutls_certificate_get_ocsp_expiration β€” NAME ✨

okay so this is a page from the gnutls manual, and the star of the show is gnutls_certificate_get_ocsp_expiration β€” the lil API function that tells you when your loaded OCSP responses go stale so you know when to refresh them 🫢


πŸ“œ SYNOPSIS

#include <gnutls/gnutls.h>

time_t
gnutls_certificate_get_ocsp_expiration(gnutls_certificate_credentials_t
sc, unsigned idx, int oidx, unsigned flags);

that's the whole vibe. time_t in, time_t out, bestie πŸ’…


πŸŽ€ ARGUMENTS

  • gnutls_certificate_credentials_t sc β€” is a credentials structure. yes, THE credentials structure, the main character πŸ‘‘
  • unsigned idx β€” is a certificate chain index as returned by gnutls_certificate_set_key() and friends. (and friends!! love a supportive friend group 🌸)
  • int oidx β€” is an OCSP response index.
  • unsigned flags β€” should be zero. that's it. just zero. don't get creative, bestie πŸ™ˆ

✨ DESCRIPTION ✨

This function returns the validity of the loaded OCSP responses, so you get the tea on when you should reload / refresh them β°πŸ¦‹

heads up: the credentials structure should be read-only when it's in use. so when you reload, either the credentials structure must not be in use by any sessions, or you allocate a brand new credentials structure for new sessions. no in-place glow-ups while the party's still going, okay? 😭

When oidx is (-1) then the minimum refresh time for all responses is returned. Otherwise, the index specifies the response corresponding to the odix certificate in the certificate chain. πŸ‘‘


πŸ’« RETURNS

On success, the expiration time of the OCSP response ✨ Otherwise (time_t)(-1) on error, or (time_t)-2 on out of bounds πŸ’€


🌈 SINCE

3.6.3 β€” a classic, an icon, been here since day one πŸŽ€


πŸ› REPORTING BUGS

Report bugs to <bugs@gnutls.org>. Home page: https://www.gnutls.org

if you found a bug, tell them fr fr, they wanna know πŸ’œ


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.

like, copy it, remix it, whatever β€” just keep the notice and this notice in there. that's the deal 🀝


πŸ‘€ 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 the whole thing, it's giving ✨comprehensive✨


and that's the page!! this was gnutls version 3.8.13, page for gnutls_certific...ocsp_expiration(3) β€” hope your OCSP responses stay fresh and your refresh timers stay correct, bestie πŸ’– stay slaying, no cap 🫢

πŸ“¦ where this page comes from