gnutls_x509_ex...ey_usage_period(3)

πŸ’… gnutls_x509_ext_import_private_key_usage_period(3) β€” the gnutls manual, but make it make sense

okay bestie so you opened the gnutls manual, section 3, and landed on gnutls_x509_ext_import_private_key_usage_period(3). slay. this is the page where we find out when a private key is allowed to exist, and honestly? iconic behavior.


✨ NAME ✨

gnutls_x509_ext_import_private_key_usage_period β€” an API function πŸŽ€


🌸 SYNOPSIS 🌸

#include <gnutls/x509-ext.h>

int gnutls_x509_ext_import_private_key_usage_period(const gnutls_datum_t
* ext, time_t * activation, time_t * expiration);

like, that's the whole vibe right there. one function, three pointers, zero drama (well, one int of potential drama, we'll get to that).


πŸ¦‹ ARGUMENTS πŸ¦‹

  • const gnutls_datum_t * ext β€” the DER encoded extension data, aka the little blob of bytes carrying the tea πŸ’–
  • time_t * activation β€” Will hold the activation time. this pointer is your girl's little cup that gets filled with when the key wakes up β˜€οΈ
  • time_t * expiration β€” Will hold the expiration time. and this one gets filled with when the key has to go home πŸŒ™

πŸ’œ DESCRIPTION πŸ’œ

This function will return the expiration and activation times of the private key as written in the PKIX extension 2.5.29.16.

that's it. that's the function. you hand it the extension data, it hands you back two timestamps. the way that it just... reads the OID 2.5.29.16 and tells you the key's whole lifespan?? main character energy fr fr πŸ”₯


🌈 RETURNS 🌈

On success, GNUTLS_E_SUCCESS (0) is returned, otherwise a negative error value.

bestie if you get a negative number back, that is NOT a vibe. check your inputs, periodt. πŸ’€

⭐ SINCE ⭐

3.3.0

so it's been around a minute. not new, not vintage, just a solid classic. iykyk πŸ‘‘


🫢 REPORTING BUGS 🫢

Report bugs to <bugs@gnutls.org>.

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

ngl if you find a bug, tell the gnutls girlies directly, they will actually want to 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 yes, take it, share it, remix it, just keep the receipt. that's the whole deal and it's honestly so 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/

go read the whole thing, it's giving encyclopedia but in a fun way, i promise πŸ’–


and that's the page!! 🧚 written up from the gnutls manual, version 3.8.13, and yes, gnutls_x509_ext_import_private_key_usage_period(3) really is the whole title, no cap. now go forth and check those key usage periods, bestie 🌸✨

πŸ“¦ where this page comes from