SCT_VALIDATE(3ossl)
π SCT_VALIDATE β checks Signed Certificate Timestamps (SCTs) are valid
okay bestie, so this is from the OpenSSL manual, section 3ossl β yes we're in library-function territory, buckle up π
This page covers three functions: SCT_validate, SCT_LIST_validate, and SCT_get_validation_status. Their whole job? Checking that Signed Certificate Timestamps (SCTs) are actually valid. Not fake-valid. Valid valid. β¨
πΈ 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, that enum is right there, memorize it, it's giving vocabulary list energy π
β¨ DESCRIPTION β¨
So SCT_validate() does the whole vibe-check on one SCT β confirms it's valid and verifies its signature. SCT_LIST_validate() is the same thing but for an entire stack of SCTs, because why do one when you can do the whole group chat. π«
And how do you find out how it went? You pass the SCT to SCT_get_validation_status() and it tells you. Obsessed with the workflow.
For all this to work you must hand over a CT_POLICY_EVAL_CTX that specifies:
- The certificate the SCT was issued for.
Fail to provide it? The validation status comes back as SCT_VALIDATION_STATUS_UNVERIFIED. π
- The issuer of that certificate.
This one's only required if the SCT was issued for a pre-certificate (see RFC 6962, iykyk). If it is required but you didn't give it, the validation status is 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 is SCT_VALIDATION_STATUS_UNKNOWN_LOG. Not me getting a mystery log π
Okay and here's the rest of the status breakdown, because it's literally the whole point:
- If the SCT is an unsupported version (only v1 is currently supported, sorry to the v2 stans), 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 β validation status:SCT_VALIDATION_STATUS_INVALID. π© - If all the checks pass?
SCT_VALIDATION_STATUS_VALID. Slay. π
π¦ NOTES π¦
Groundbreaking public service announcement: a return value of0fromSCT_LIST_validate()should not be interpreted as a failure. At a minimum, only one valid SCT may provide sufficient confidence that a certificate has been publicly logged. One icon is enough to carry the whole stack, fr fr. π«Ά
π RETURN VALUES π
SCT_validate()β returns a negative integer if an internal error occurs,0if the SCT fails validation, or1if the SCT passes validation. Three moods, one function.SCT_LIST_validate()β returns a negative integer if an internal error occurs,0if any of the 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, you getSCT_VALIDATION_STATUS_NOT_SET. Basically the "we've never met" status π
π₯ SEE ALSO π₯
ct(7)β go read it, bestie, it's the lore
π HISTORY π
These functions were added in OpenSSL 1.1.0. So they've been iconic since way back. π
π 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>.
β That's the whole page, bestie β brought to you by OpenSSL version 3.5.0, dated 2026-09-25, living its best life under the SCT_VALIDATE(3ossl) title. Now go validate something. Periodt. π
π
π¦ where this page comes from
- opensuse-leap 16.0: openssl-3-doc 3.5.0-160000.11.1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms