GNUTLS_X509_CRT_GET_SUBJECT_KEY_ID(3)

πŸ’… gnutls_x509_crt_get_subject_key_id β€” the API function that gets ur cert's Subject Key Identifier

ok so bestie, welcome to the gnutls manual page for gnutls_x509_crt_get_subject_key_id(3) β€” yes that's a whole mouthful, we're saying it with our chest πŸ’–


✨ SYNOPSIS ✨

#include <gnutls/x509.h>

int gnutls_x509_crt_get_subject_key_id(gnutls_x509_crt_t cert, void *
ret, size_t * ret_size, unsigned int * critical);

like. look at her. so much type in one little function signature πŸŽ€


🌸 ARGUMENTS 🌸

  • gnutls_x509_crt_t cert β€” this one should contain a gnutls_x509_crt_t type. that's the cert we're vibing with, she's the main character here πŸ‘‘
  • void * ret β€” the place where the identifier will be copied. yes literally just a spot in memory for the identifier to land, like a little parking spot for ur data πŸš—
  • size_t * ret_size β€” holds the size of the result field. it's giving "how much room do we have" energy πŸ“
  • unsigned int * critical β€” will be non-zero if the extension is marked as critical (may be null). so like, if this extension is a big deal, this lights up. and yes, it may be null, she's optional bestie, no pressure 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

so this function? it will return the X.509v3 certificate's subject key identifier. periodt.

and where does she get it from, u ask? it's obtained by the X.509 Subject Key identifier extension field, aka 2.5.29.14 β€” remember that number, iykyk πŸ”₯


πŸ’« RETURNS πŸ’«

  • on success, GNUTLS_E_SUCCESS (which is literally 0, no cap) is returned ✨
  • GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE if the extension is not present β€” like sorry bestie, it's just not there 😭
  • otherwise? a negative error value. yeah. negative. as in, not the vibe πŸ’€

πŸ™ˆ REPORTING BUGS πŸ™ˆ

found a bug? tell the girlies at <bugs@gnutls.org>. they will handle it fr fr πŸ›

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. so like, take her, share her, just keep the receipts okay? πŸ’–


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

like go read it, it's iconic, i'm obsessed πŸ“šβœ¨


and that's the whole page bestie, we ate and left no crumbs πŸ‘‘πŸ’…

signing off from the gnutls manual, version 3.8.13, page gnutls_x509_crt..._subject_key_id(3) β€” mwah, love u, go write some secure code 🫢🌸

πŸ“¦ where this page comes from