gnutls_x509_ct_sct_get_version(3)

πŸ’– gnutls_x509_ct_sct_get_version(3) β€” the gnutls manual, but make it cute πŸ’–

okay bestie, sit down, hydrate, and let me tell you about this lil function from the gnutls manual. it's called gnutls_x509_ct_sct_get_version and it is exactly what it sounds like: you hand it a list of SCTs, you point at one of them, and it tells you which version that one is. that's it. that's the whole job. she's simple, she's focused, she's giving ✨single responsibility✨.


🌸 NAME 🌸

gnutls_x509_ct_sct_get_version β€” API function πŸŽ€

like. the name is the description. the way that gnutls just tells you. obsessed.


✨ SYNOPSIS ✨

#include <gnutls/x509-ext.h>

int gnutls_x509_ct_sct_get_version(gnutls_x509_ct_scts_t scts, unsigned
idx, unsigned int * version_out);

yes the header is <gnutls/x509-ext.h>, don't forget it, i will know πŸ™ˆ


🫢 ARGUMENTS 🫢

  • gnutls_x509_ct_scts_t scts β€” a list of SCTs. your little squad of SCTs. the roster. the group chat, if you will πŸ’…
  • unsigned idx β€” the index of the target SCT in the list. which one are we looking at, bestie? pick a number πŸ‘€
  • unsigned int * version_out β€” the version of the target SCT. this is where the answer lands. she's an out-param and she's thriving.

πŸ’œ DESCRIPTION πŸ’œ

so here's the vibe. this function obtains the version of the SCT at the given position in the SCT list. that's the whole plot. no twists. main character energy but the plot is just "tell me the version" and honestly? relatable.

the version of that SCT will be placed on version_out. put it down, write it out, leave it there for you. πŸ¦‹

Return: GNUTLS_E_SUCCESS (0) is returned on success β€” yay, slay, we ate πŸ“

but also, the receipts:

  • GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE if idx exceeds the number of SCTs in the list. you asked for SCT number 47 in a list of 3. she's not there. she never was. 😭
  • GNUTLS_E_INVALID_REQUEST if the SCT's version is different than 1, as that's currently the only defined version. this is a real one β€” version 1 is literally the only version that exists rn, so anything else gets bounced. no cap.
ngl, keep an eye on that second error code. "currently the only defined version" is doing a lot of work in that sentence, and it's not a vibe you get to argue with.

πŸ’€ REPORTING BUGS πŸ’€

found a bug? first of all, sorry bestie. second of all, tell the gnutls people, not me:


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 queen, royalty-free, go forth and redistribute. ✨


🌟 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 the manual manual. iykyk πŸ“šπŸ’–


and that's the whole page, bestie!! gnutls, version 3.8.13, straight from the gnutls_x509_ct_sct_get_version(3) corner of the gnutls manual β€” love her, read her, return GNUTLS_E_SUCCESS and go touch some grass πŸŒΈπŸ¦‹πŸ’…

πŸ“¦ where this page comes from