GNUTLS_X509_CRT_GET_PRIVATE_KEY_USAGE_PERIOD(3)

πŸ’– NAME πŸ’–

gnutls_x509_crt_get_private_key_usage_period β€” bestie, this is an API function, and it's here to tell you when a certificate's private key is allowed to do its little thing ✨

It lives in the gnutls manual, section 3, so if you were hunting for it in the man pages, you found her πŸŽ€


✨ SYNOPSIS ✨

#include <gnutls/x509.h>

int gnutls_x509_crt_get_private_key_usage_period(gnutls_x509_crt_t cert,
time_t * activation, time_t * expiration, unsigned int * critical);

okay so it's literally just one include and one function call, we love a low-effort baddie 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_x509_crt_t cert β€” should contain a gnutls_x509_crt_t type. like, that's the cert we're snooping on πŸ’…
  • time_t * activation β€” the activation time ⏰
  • time_t * expiration β€” the expiration time βŒ›
  • unsigned int * critical β€” the extension status πŸ‘‘

πŸ¦‹ DESCRIPTION πŸ¦‹

so what does she actually do?? This function will return the expiration and activation times of the private key of the certificate πŸ”₯

And it gets those from the PKIX extension 2.5.29.16 β€” so that extension has to be present, no cap. If it's not there, girl, she's not gonna magic it out of thin air πŸ™ˆ


⭐ RETURNS ⭐

  • On success, GNUTLS_E_SUCCESS (0) is returned πŸŽ‰
  • GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE if the extension is not present 😭 (yep, told you)
  • otherwise a negative error value πŸ’€

🌸 REPORTING BUGS 🌸

Found a bug? Report bugs to <bugs@gnutls.org> πŸ“§

Home page: 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. 🫢 iconic, honestly.


πŸ‘‘ 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, you ate πŸ’… β€” this was gnutls version 3.8.13, periodt πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from