OSSL_ESS_CHECK_SIGNING_CERTS(3ossl)
π OSSL_ESS_CHECK_SIGNING_CERTS π
okay bestie, so this whole page is from the OpenSSL manual, section 3ossl, and it's literally all about Enhanced Security Services (ESS) functions β¨ like, the certificate-identifier girlies that make signed stuff trustworthy. it's giving niche but iconic, ngl π
πΈ NAME πΈ
OSSL_ESS_signing_cert_new_init, OSSL_ESS_signing_cert_v2_new_init, OSSL_ESS_check_signing_certs β the Enhanced Security Services (ESS) functions, aka the trio you're gonna meet right now π
β¨ SYNOPSIS β¨
#include <openssl/ess.h>
ESS_SIGNING_CERT *OSSL_ESS_signing_cert_new_init(const X509 *signcert,
const STACK_OF(X509) *certs,
int set_issuer_serial);
ESS_SIGNING_CERT_V2 *OSSL_ESS_signing_cert_v2_new_init(const EVP_MD *hash_alg,
const X509 *signcert,
const
STACK_OF(X509) *certs,
int set_issuer_serial);
int OSSL_ESS_check_signing_certs(const ESS_SIGNING_CERT *ss,
const ESS_SIGNING_CERT_V2 *ssv2,
const STACK_OF(X509) *chain,
int require_signing_cert);
like, yes, the second one has a whole line break in the middle of STACK_OF(X509). that's just how it is. respect the formatting π
π¦ DESCRIPTION π¦
okay so first up: OSSL_ESS_signing_cert_new_init() generates a brand new ESS_SIGNING_CERT structure that references the given signcert plus any further certs you hand it, using their SHA-1 fingerprints π
(yes bestie, SHA-1, that's the spec).
and listen β if set_issuer_serial is nonzero, then the issuer and serial number of signcert also get included in the ESS_CERT_ID as the issuerSerial field πΈ and for all members of certs, the issuerSerial field is always included. no asking, it just is. periodt.
OSSL_ESS_signing_cert_v2_new_init() is literally the same as OSSL_ESS_signing_cert_new_init() except it uses the given hash_alg and generates an ESS_SIGNING_CERT_V2 structure with ESS_CERT_ID_V2 elements. v2 coded, hash-algo-flexible, slay π
OSSL_ESS_check_signing_certs() is the vibe check π β it checks if the validation chain chain contains the certificates required by the identifiers given in ss and/or ssv2.
here's the fine print, and it's lowkey important:
- if
require_signing_certis nonzero,ssorssv2must not beNULLπ«Ά - if both
ssandssv2are notNULL, they are evaluated independently - the list of certificate identifiers in
ssis of typeESS_CERT_ID, while the list inssv2is of typeESS_CERT_ID_V2 - as far as these lists are present, they must be nonempty (empty list = not the vibe π)
- the certificate identified by their first entry must be the first element of
chain, i.e. the signer certificate - any further certificates referenced in the list must also be found in
chain - the matching is done using the given certificate hash algorithm and value
- and in addition to the checks required by RFCs 2624 and 5035, if the
issuerSerialfield is included in anESSCertIDorESSCertIDv2, it must match the certificate issuer and serial number attributes π
π§ NOTES π§
ESS has been defined in RFC 2634, which has been updated in RFC 5035 (that's the ESS version 2 glow-up β¨) to support hash algorithms other than SHA-1. it's used for TSP (RFC 3161) and CAdES-BES (informational RFC 5126). iykyk π
π₯ RETURN VALUES π₯
OSSL_ESS_signing_cert_new_init()andOSSL_ESS_signing_cert_v2_new_init()return a pointer to the new structure, orNULLon malloc failure πOSSL_ESS_check_signing_certs()returns1on success π,0if a required certificate cannot be found π, and-1on other error π
bestie the0vs-1distinction is not a drill.0means "cert missing",-1means "something else went wrong". don't conflate them fr fr.
π SEE ALSO π
β HISTORY β
OSSL_ESS_signing_cert_new_init(), OSSL_ESS_signing_cert_v2_new_init(), and OSSL_ESS_check_signing_certs() were added in OpenSSL 3.0. glow-up era confirmed π
π COPYRIGHT π
Copyright 2021-2022 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>. π«Ά
ok that's the whole thing bestie π now go forth and validate those signing certs. no cap, you got this β¨
mwah π β written from the OpenSSL 3.5.6 docs, dated 2026-04-0, and yes the trailing OSSL_ESS_CHECK_SIGNING_CERTS(3ossl) at the bottom is just the footer being its usual self π
π¦ where this page comes from
- freebsd 15.1: base 15.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms