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 withgnutls_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 withgnutls_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_AVAILABLEifidxexceeds 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:
- Report bugs to <bugs@gnutls.org>.
- Home page: https://www.gnutls.org
π COPYRIGHT π
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
- alpine 3.22: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.23: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.24: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- arch rolling: gnutls 3.8.13-3 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- ubuntu stonking: gnutls-doc 3.8.13-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms