1OSSL_ESS_CHECK_SIGNING_CERTS(3ossl) OpenSSLOSSL_ESS_CHECK_SIGNING_CERTS(3ossl)
2
3
4
6 OSSL_ESS_signing_cert_new_init, OSSL_ESS_signing_cert_v2_new_init,
7 OSSL_ESS_check_signing_certs - Enhanced Security Services (ESS)
8 functions
9
11 #include <openssl/ess.h>
12
13 ESS_SIGNING_CERT *OSSL_ESS_signing_cert_new_init(const X509 *signcert,
14 const STACK_OF(X509) *certs,
15 int set_issuer_serial);
16 ESS_SIGNING_CERT_V2 *OSSL_ESS_signing_cert_v2_new_init(const EVP_MD *hash_alg,
17 const X509 *signcert,
18 const
19 STACK_OF(X509) *certs,
20 int set_issuer_serial);
21 int OSSL_ESS_check_signing_certs(const ESS_SIGNING_CERT *ss,
22 const ESS_SIGNING_CERT_V2 *ssv2,
23 const STACK_OF(X509) *chain,
24 int require_signing_cert);
25
27 OSSL_ESS_signing_cert_new_init() generates a new ESS_SIGNING_CERT
28 structure referencing the given signcert and any given further certs
29 using their SHA-1 fingerprints. If set_issuer_serial is nonzero then
30 also the issuer and serial number of signcert are included in the
31 ESS_CERT_ID as the issuerSerial field. For all members of certs the
32 issuerSerial field is always included.
33
34 OSSL_ESS_signing_cert_v2_new_init() is the same as
35 OSSL_ESS_signing_cert_new_init() except that it uses the given hash_alg
36 and generates a ESS_SIGNING_CERT_V2 structure with ESS_CERT_ID_V2
37 elements.
38
39 OSSL_ESS_check_signing_certs() checks if the validation chain chain
40 contains the certificates required by the identifiers given in ss
41 and/or ssv2. If require_signing_cert is nonzero, ss or ssv2 must not
42 be NULL. If both ss and ssv2 are not NULL, they are evaluated
43 independently. The list of certificate identifiers in ss is of type
44 ESS_CERT_ID, while the list contained in ssv2 is of type
45 ESS_CERT_ID_V2. As far as these lists are present, they must be
46 nonempty. The certificate identified by their first entry must be the
47 first element of chain, i.e. the signer certificate. Any further
48 certificates referenced in the list must also be found in chain. The
49 matching is done using the given certificate hash algorithm and value.
50 In addition to the checks required by RFCs 2624 and 5035, if the
51 issuerSerial field is included in an ESSCertID or ESSCertIDv2 it must
52 match the certificate issuer and serial number attributes.
53
55 ESS has been defined in RFC 2634, which has been updated in RFC 5035
56 (ESS version 2) to support hash algorithms other than SHA-1. This is
57 used for TSP (RFC 3161) and CAdES-BES (informational RFC 5126).
58
60 OSSL_ESS_signing_cert_new_init() and
61 OSSL_ESS_signing_cert_v2_new_init() return a pointer to the new
62 structure or NULL on malloc failure.
63
64 OSSL_ESS_check_signing_certs() returns 1 on success, 0 if a required
65 certificate cannot be found, -1 on other error.
66
68 TS_VERIFY_CTX_set_certs(3), CMS_verify(3)
69
71 OSSL_ESS_signing_cert_new_init(), OSSL_ESS_signing_cert_v2_new_init(),
72 and OSSL_ESS_check_signing_certs() were added in OpenSSL 3.0.
73
75 Copyright 2021-2022 The OpenSSL Project Authors. All Rights Reserved.
76
77 Licensed under the Apache License 2.0 (the "License"). You may not use
78 this file except in compliance with the License. You can obtain a copy
79 in the file LICENSE in the source distribution or at
80 <https://www.openssl.org/source/license.html>.
81
82
83
843.1.1 2023-08-31OSSL_ESS_CHECK_SIGNING_CERTS(3ossl)