SCT_VALIDATE(3ossl)
π SCT_VALIDATE(3ossl) β the OpenSSL manual, but make it make sense β¨
okay so bestie, we're in SCT_VALIDATE(3ossl) territory, which is part of the OpenSSL fam π«Ά and it's all about checking whether Signed Certificate Timestamps (SCTs) are actually valid. yes queen, certificate transparency lore. let's get into it π
β¨ NAME β¨
SCT_validate, SCT_LIST_validate, SCT_get_validation_status β they check that Signed Certificate Timestamps (SCTs) are valid. that's the whole job. no cap π
πΈ SYNOPSIS πΈ
#include <openssl/ct.h>
typedef enum {
SCT_VALIDATION_STATUS_NOT_SET,
SCT_VALIDATION_STATUS_UNKNOWN_LOG,
SCT_VALIDATION_STATUS_VALID,
SCT_VALIDATION_STATUS_INVALID,
SCT_VALIDATION_STATUS_UNVERIFIED,
SCT_VALIDATION_STATUS_UNKNOWN_VERSION
} sct_validation_status_t;
int SCT_validate(SCT *sct, const CT_POLICY_EVAL_CTX *ctx);
int SCT_LIST_validate(const STACK_OF(SCT) *scts, CT_POLICY_EVAL_CTX *ctx);
sct_validation_status_t SCT_get_validation_status(const SCT *sct);
like, look at that enum. six whole statuses. it's giving options π
π¦ DESCRIPTION π¦
so SCT_validate() checks that one SCT is valid and verifies its signature. iconic behavior honestly. and SCT_LIST_validate()? same energy, but for an entire stack of SCTs β it does all the same checks on the whole STACK_OF(SCT) at once. π
wanna know how it went? just pass the SCT to SCT_get_validation_status() and it'll tell you the tea. periodt.
now, you must hand over a CT_POLICY_EVAL_CTX that specifies:
- the certificate the SCT was issued for π
if you don't provide it, the validation status ends up as SCT_VALIDATION_STATUS_UNVERIFIED. awkward.
- the issuer of that certificate π
this one's only needed if the SCT was issued for a pre-certificate (see RFC 6962 β yes, we're citing RFCs, we contain multitudes). if it is required but you didn't provide it, the validation status will be SCT_VALIDATION_STATUS_UNVERIFIED. again.
- a
CTLOG_STOREthat contains the CT log that issued this SCT π
if the SCT came from a log that isn't in this CTLOG_STORE, the validation status will be SCT_VALIDATION_STATUS_UNKNOWN_LOG. it's literally not on the list, bestie.
and then:
- if the SCT is of an unsupported version (only v1 is currently supported, jsyk), the validation status will be
SCT_VALIDATION_STATUS_UNKNOWN_VERSIONπ - if the SCT's signature is incorrect, or its timestamp is in the future (relative to the time in
CT_POLICY_EVAL_CTX), or if it's otherwise invalid, the validation status will beSCT_VALIDATION_STATUS_INVALIDπ - and if all the checks pass? the validation status will be
SCT_VALIDATION_STATUS_VALIDπ slay!! main character ending!!
π NOTES π
do not read a return value of 0 from SCT_LIST_validate() as a failure. fr fr.
at a minimum, only one valid SCT may provide sufficient confidence that a certificate has been publicly logged. so like, one is enough to be confident. one single baddie SCT carrying the whole vibe check. π
β RETURN VALUES β
SCT_validate()returns a negative integer if an internal error occurs π,0if the SCT fails validation π, or1if the SCT passes validation π₯SCT_LIST_validate()returns a negative integer if an internal error occurs π,0if any of SCTs fails validation π, or1if they all pass validation π₯SCT_get_validation_status()returns the validation status of the SCT. and ifSCT_validate()orSCT_LIST_validate()have not been passed that SCT, the returned value will beSCT_VALIDATION_STATUS_NOT_SETβ like, we simply don't know her yet π«Ά
π SEE ALSO π
(the crossover episode you didn't know you needed)
π§ HISTORY π§
these functions were added in OpenSSL 1.1.0. vintage but still serving β¨
π COPYRIGHT π
Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.
okay that's the whole page, bestie, you ate ππ
and btw this was OpenSSL version 3.5.9, dated 2026-09-29 β mwah, love u, go validate some SCTs ππ
π¦ where this page comes from
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms