gnutls_x509_ex..._subject_key_id(3)

✨ NAME ✨

gnutls_x509_ext_export_subject_key_id β€” it's an API function bestie, and it's giving "turn my key id into a whole DER extension" πŸ’…

So this lives in the gnutls manual, and we're gonna walk through it together, okay? No stress.


πŸŽ€ SYNOPSIS πŸŽ€

#include <gnutls/x509-ext.h>

int gnutls_x509_ext_export_subject_key_id(const gnutls_datum_t * id,
gnutls_datum_t * ext);

πŸ¦‹ ARGUMENTS πŸ¦‹

  • const gnutls_datum_t * id β€” the key identifier, periodt. That's the thing you're bringing to the party.
  • gnutls_datum_t * ext β€” the DER-encoded extension data that comes out of this. Lowkey important: you must free it using gnutls_free(). Do not forget. I will know. 😭

🌸 DESCRIPTION 🌸

Okay so real talk: this function takes the key identifier you hand it and converts it into a DER-encoded PKIX SubjectKeyIdentifier extension. That's the glow-up. ✨

And the output data sitting in ext? It gets allocated using gnutls_malloc(). So yeah, that's why you gotta free it yourself β€” you own it now, bestie. 🫢


πŸ‘‘ RETURNS πŸ‘‘

On success you get GNUTLS_E_SUCCESS (0) back, and that's the slay. Otherwise you get a negative error value, which is the vibe check failing. πŸ’€


⭐ SINCE ⭐

3.3.0 β€” been iconic since day one, fr fr.


πŸ’œ REPORTING BUGS πŸ’œ

Found a bug? Not me being the one to tell you β€” go report it 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. (Yes that's the whole legal vibe, and it's unhinged in the best way. Copy away, respectfully. πŸŽ€)


πŸ”₯ SEE ALSO πŸ”₯

The full documentation for gnutls is maintained as a Texinfo manual. So if the /usr/share/doc/gnutls/ directory does not contain the HTML form, visit

https://www.gnutls.org/manual/

iykyk. πŸ“š


And that's the whole page, bestie β€” this was gnutls, version 3.8.13, and the page is gnutls_x509_ex..._subject_key_id(3). Go forth and export those subject key identifiers. πŸ’–πŸ§š

πŸ“¦ where this page comes from