gnutls_pubkey_set_key_usage(3)

πŸ’– gnutls_pubkey_set_key_usage(3) πŸ’–

okay bestie, welcome to the gnutls manual, page for gnutls_pubkey_set_key_usage πŸŽ€ this is the one where you tell a public key what it's allowed to do with its life. very main character, very "setting boundaries" energy. πŸ’…


✨ NAME ✨

gnutls_pubkey_set_key_usage β€” an API function πŸ¦‹


✨ SYNOPSIS ✨

#include <gnutls/abstract.h>

int gnutls_pubkey_set_key_usage(gnutls_pubkey_t key, unsigned int
usage);

✨ ARGUMENTS ✨

  • gnutls_pubkey_t key β€” a certificate of type gnutls_x509_crt_t. yes girl, the docs literally say certificate, we're just reporting the vibe 🌸
  • unsigned int usage β€” a whole ORed sequence of the GNUTLS_KEY_* elements. stack 'em up with |, it's giving buffet πŸ“

✨ DESCRIPTION ✨

so this function sets the key usage flags of the public key. that's it, that's the whole job, no cap. πŸ”₯

and like, lowkey important: this is only useful if the key is going to be exported to a certificate or a certificate request. if you're not exporting, this whole thing is just you doing arts and crafts for nobody πŸ’€ so keep that in mind bestie.


✨ RETURNS ✨

if it works? you get GNUTLS_E_SUCCESS (0) πŸŽ‰ icon. ate. periodt.

if it doesn't? you get a negative error value 😭 rude, but at least it's honest.


✨ SINCE ✨

2.12.0 β€” she's been around a minute, a true veteran of the game πŸ‘‘


✨ REPORTING BUGS ✨

found a bug? don't suffer in silence, tell the people 🫢


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. slay, generous, we love to see it 🌈


✨ 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/

heads up bestie: this page is from the gnutls manual, version 3.8.13 🧚 if you're reading a different version, double check, iykyk.

and that's the whole page!! go forth and set those key usages, you absolute legend πŸ’œβœ¨ bye bestie!! πŸŽ€πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from