GNUTLS_X509_CRT_SET_SUBJECT_KEY_ID(3)

πŸ’– NAME πŸ’–

gnutls_x509_crt_set_subject_key_id β€” bestie, this is the API function that lets you set a cert's subject key ID. That's it. That's the whole job. ✨

(Also hey, hi, this page lives in the gnutls manual, section 3, and if you're here you're probably deep in X.509 land. Respect. 🫢)


🌸 SYNOPSIS 🌸

#include <gnutls/x509.h>

int gnutls_x509_crt_set_subject_key_id(gnutls_x509_crt_t cert, const
                                       void * id, size_t id_size);

Yeah, that's the whole vibe. Include the header, call the function, live your truth. πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_x509_crt_t cert β€” a certificate of type gnutls_x509_crt_t. Like, the actual cert you're messing with. Your main character. πŸ‘‘
  • const void * id β€” The key ID. Just the raw bytes, no thoughts, no commentary. πŸ¦‹
  • size_t id_size β€” Holds the size of the subject key ID field. So basically: how many bytes of id are we talking. πŸ“

✨ DESCRIPTION ✨

Okay so here's the tea: this function will set the X.509 certificate's subject key ID extension. That's it. You hand it a cert, you hand it an ID, you hand it a size, and boom β€” that extension is now on the certificate. Not me being obsessed with a setter function but here we are. πŸ˜­πŸ’–


πŸ”₯ RETURNS πŸ”₯

On success, GNUTLS_E_SUCCESS (0) is returned, otherwise a negative error value. So if you get a 0, slay, you ate. If you get something negative, that's your sign to go read the error code, bestie. 🌈


πŸ› REPORTING BUGS πŸ›

Found a bug? Not the vibe, but please tell the people who can fix it:


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. (Translation: keep the receipt, share freely, we love that for you. 🫢)


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

okay that's the whole page, no cap, every last detail intact πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«ΆπŸ˜­πŸ”₯πŸ‘‘πŸŒˆβ­πŸ’€πŸ™ˆπŸ“πŸ§šπŸ’œ

This was gnutls 3.8.13, section 3 of the manual β€” go forth and set those subject key IDs, bestie. Periodt. πŸ’…

πŸ“¦ where this page comes from