=pod =head1 NAME OSSL_ESS_signing_cert_new_init, OSSL_ESS_signing_cert_v2_new_init, OSSL_ESS_check_signing_certs - Enhanced Security Services (ESS) functions =head1 SYNOPSIS #include 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); =head1 DESCRIPTION OSSL_ESS_signing_cert_new_init() generates a new B structure referencing the given I and any given further I using their SHA-1 fingerprints. If I is nonzero then also the issuer and serial number of I are included in the B as the B field. For all members of I the B field is always included. OSSL_ESS_signing_cert_v2_new_init() is the same as OSSL_ESS_signing_cert_new_init() except that it uses the given I and generates a B structure with B elements. OSSL_ESS_check_signing_certs() checks if the validation chain I contains the certificates required by the identifiers given in I and/or I. If I is nonzero, I or I must not be NULL. If both I and I are not NULL, they are evaluated independently. The list of certificate identifiers in I is of type B, while the list contained in I is of type B. As far as these lists are present, they must be nonempty. The certificate identified by their first entry must be the first element of I, i.e. the signer certificate. Any further certificates referenced in the list must also be found in I. The matching is done using the given certificate hash algorithm and value. In addition to the checks required by RFCs 2624 and 5035, if the B field is included in an B or B it must match the certificate issuer and serial number attributes. =head1 NOTES ESS has been defined in RFC 2634, which has been updated in RFC 5035 (ESS version 2) to support hash algorithms other than SHA-1. This is used for TSP (RFC 3161) and CAdES-BES (informational RFC 5126). =head1 RETURN VALUES OSSL_ESS_signing_cert_new_init() and OSSL_ESS_signing_cert_v2_new_init() return a pointer to the new structure or NULL on malloc failure. OSSL_ESS_check_signing_certs() returns 1 on success, 0 if a required certificate cannot be found, -1 on other error. =head1 SEE ALSO L, L =head1 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. =head1 COPYRIGHT Copyright 2021-2023 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 L. =cut