gnutls_x509_ct_sct_get(3)

πŸ’– gnutls_x509_ct_sct_get β€” bestie edition πŸ’–

okay so this is a page from the gnutls manual, section 3, and we're talking about gnutls_x509_ct_sct_get. she's a lil function that pulls one (1) Signed Certificate Timestamp out of a whole list. very demure, very mindful. let's get into it 🫢


✨ NAME ✨

gnutls_x509_ct_sct_get β€” literally an API function, that's her whole job description πŸ’…


🌸 SYNOPSIS 🌸

#include <gnutls/x509-ext.h>

int gnutls_x509_ct_sct_get(const gnutls_x509_ct_scts_t scts, unsigned
idx, time_t * timestamp, gnutls_datum_t * logid, gnutls_sign_algorithm_t
* sigalg, gnutls_datum_t * signature);

πŸŽ€ ARGUMENTS πŸŽ€

  • const gnutls_x509_ct_scts_t scts β€” a list of SCTs. like, the whole squad of timestamps. πŸ‘‘
  • unsigned idx β€” the index of the target SCT in the list. which one do you want, bestie? pick a number. πŸ”’
  • time_t * timestamp β€” the timestamp of the SCT. when did this happen, fr fr. ⏰
  • gnutls_datum_t * logid β€” the LogID field of the SCT. heads up though: this one must be freed with gnutls_free() β€” do not ghost her, she needs closure. 🧚
  • gnutls_sign_algorithm_t * sigalg β€” the signature algorithm. the vibe of the signature, essentially. πŸ”₯
  • gnutls_datum_t * signature β€” the signature of the SCT. and yeah, same rule: this must be freed with gnutls_free() too. two datums, two cleanups, no exceptions. πŸ’€

🌈 DESCRIPTION 🌈

so this function will return a specific SCT (Signed Certificate Timestamp β€” yes that's what it stands for, iykyk) that's stored in the SCT list scts.

the datums holding the SCT's LogId and signature will be allocated using gnutls_malloc(). so they're yours now, you own them, you gotta take care of them. that's the whole point of the gnutls_free() situation up there. 🌸


⭐ RETURNS ⭐

  • GNUTLS_E_SUCCESS (0) gets returned on success β€” slay, we ate. πŸŽ‰
  • GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE if idx exceeds the number of SCTs in the list β€” meaning you asked for an index that simply does not exist, bestie, she's not there. 😭
  • or a negative error value. the usual suspects. πŸ’€

πŸ™ˆ REPORTING BUGS πŸ™ˆ

found something broken? don't suffer in silence, tell the devs:


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: you can copy and share this, just keep the copyright notice and this notice intact. free of charge. iconic behaviour, honestly.) πŸ’œ


πŸ¦‹ 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/


ok that's the whole page bestie, no cap. go free your datums. 🫢

this was gnutls_x509_ct_sct_get(3) from the gnutls manual β€” the page itself is running with version 3.8.13 of gnutls. mwah, take care of those allocations, bye!! πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from