| 1 |
.\" -*- mode: troff; coding: utf-8 -*- |
| 2 |
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45) |
| 3 |
.\" |
| 4 |
.\" Standard preamble: |
| 5 |
.\" ======================================================================== |
| 6 |
.de Sp \" Vertical space (when we can't use .PP) |
| 7 |
.if t .sp .5v |
| 8 |
.if n .sp |
| 9 |
.. |
| 10 |
.de Vb \" Begin verbatim text |
| 11 |
.ft CW |
| 12 |
.nf |
| 13 |
.ne \\$1 |
| 14 |
.. |
| 15 |
.de Ve \" End verbatim text |
| 16 |
.ft R |
| 17 |
.fi |
| 18 |
.. |
| 19 |
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. |
| 20 |
.ie n \{\ |
| 21 |
. ds C` "" |
| 22 |
. ds C' "" |
| 23 |
'br\} |
| 24 |
.el\{\ |
| 25 |
. ds C` |
| 26 |
. ds C' |
| 27 |
'br\} |
| 28 |
.\" |
| 29 |
.\" Escape single quotes in literal strings from groff's Unicode transform. |
| 30 |
.ie \n(.g .ds Aq \(aq |
| 31 |
.el .ds Aq ' |
| 32 |
.\" |
| 33 |
.\" If the F register is >0, we'll generate index entries on stderr for |
| 34 |
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index |
| 35 |
.\" entries marked with X<> in POD. Of course, you'll have to process the |
| 36 |
.\" output yourself in some meaningful fashion. |
| 37 |
.\" |
| 38 |
.\" Avoid warning from groff about undefined register 'F'. |
| 39 |
.de IX |
| 40 |
.. |
| 41 |
.nr rF 0 |
| 42 |
.if \n(.g .if rF .nr rF 1 |
| 43 |
.if (\n(rF:(\n(.g==0)) \{\ |
| 44 |
. if \nF \{\ |
| 45 |
. de IX |
| 46 |
. tm Index:\\$1\t\\n%\t"\\$2" |
| 47 |
.. |
| 48 |
. if !\nF==2 \{\ |
| 49 |
. nr % 0 |
| 50 |
. nr F 2 |
| 51 |
. \} |
| 52 |
. \} |
| 53 |
.\} |
| 54 |
.rr rF |
| 55 |
.\" ======================================================================== |
| 56 |
.\" |
| 57 |
.IX Title "OSSL_ESS_CHECK_SIGNING_CERTS 3SSL" |
| 58 |
.TH OSSL_ESS_CHECK_SIGNING_CERTS 3SSL 2026-04-07 3.6.2 OpenSSL |
| 59 |
.\" For nroff, turn off justification. Always turn off hyphenation; it makes |
| 60 |
.\" way too many mistakes in technical documents. |
| 61 |
.if n .ad l |
| 62 |
.nh |
| 63 |
.SH NAME |
| 64 |
OSSL_ESS_signing_cert_new_init, |
| 65 |
OSSL_ESS_signing_cert_v2_new_init, |
| 66 |
OSSL_ESS_check_signing_certs |
| 67 |
\&\- Enhanced Security Services (ESS) functions |
| 68 |
.SH SYNOPSIS |
| 69 |
.IX Header "SYNOPSIS" |
| 70 |
.Vb 1 |
| 71 |
\& #include <openssl/ess.h> |
| 72 |
\& |
| 73 |
\& ESS_SIGNING_CERT *OSSL_ESS_signing_cert_new_init(const X509 *signcert, |
| 74 |
\& const STACK_OF(X509) *certs, |
| 75 |
\& int set_issuer_serial); |
| 76 |
\& ESS_SIGNING_CERT_V2 *OSSL_ESS_signing_cert_v2_new_init(const EVP_MD *hash_alg, |
| 77 |
\& const X509 *signcert, |
| 78 |
\& const |
| 79 |
\& STACK_OF(X509) *certs, |
| 80 |
\& int set_issuer_serial); |
| 81 |
\& int OSSL_ESS_check_signing_certs(const ESS_SIGNING_CERT *ss, |
| 82 |
\& const ESS_SIGNING_CERT_V2 *ssv2, |
| 83 |
\& const STACK_OF(X509) *chain, |
| 84 |
\& int require_signing_cert); |
| 85 |
.Ve |
| 86 |
.SH DESCRIPTION |
| 87 |
.IX Header "DESCRIPTION" |
| 88 |
\&\fBOSSL_ESS_signing_cert_new_init()\fR generates a new \fBESS_SIGNING_CERT\fR structure |
| 89 |
referencing the given \fIsigncert\fR and any given further \fIcerts\fR |
| 90 |
using their SHA\-1 fingerprints. |
| 91 |
If \fIset_issuer_serial\fR is nonzero then also the issuer and serial number |
| 92 |
of \fIsigncert\fR are included in the \fBESS_CERT_ID\fR as the \fBissuerSerial\fR field. |
| 93 |
For all members of \fIcerts\fR the \fBissuerSerial\fR field is always included. |
| 94 |
.PP |
| 95 |
\&\fBOSSL_ESS_signing_cert_v2_new_init()\fR is the same as |
| 96 |
\&\fBOSSL_ESS_signing_cert_new_init()\fR except that it uses the given \fIhash_alg\fR and |
| 97 |
generates a \fBESS_SIGNING_CERT_V2\fR structure with \fBESS_CERT_ID_V2\fR elements. |
| 98 |
.PP |
| 99 |
\&\fBOSSL_ESS_check_signing_certs()\fR checks if the validation chain \fIchain\fR contains |
| 100 |
the certificates required by the identifiers given in \fIss\fR and/or \fIssv2\fR. |
| 101 |
If \fIrequire_signing_cert\fR is nonzero, \fIss\fR or \fIssv2\fR must not be NULL. |
| 102 |
If both \fIss\fR and \fIssv2\fR are not NULL, they are evaluated independently. |
| 103 |
The list of certificate identifiers in \fIss\fR is of type \fBESS_CERT_ID\fR, |
| 104 |
while the list contained in \fIssv2\fR is of type \fBESS_CERT_ID_V2\fR. |
| 105 |
As far as these lists are present, they must be nonempty. |
| 106 |
The certificate identified by their first entry must be the first element of |
| 107 |
\&\fIchain\fR, i.e. the signer certificate. |
| 108 |
Any further certificates referenced in the list must also be found in \fIchain\fR. |
| 109 |
The matching is done using the given certificate hash algorithm and value. |
| 110 |
In addition to the checks required by RFCs 2624 and 5035, |
| 111 |
if the \fBissuerSerial\fR field is included in an \fBESSCertID\fR or \fBESSCertIDv2\fR |
| 112 |
it must match the certificate issuer and serial number attributes. |
| 113 |
.SH NOTES |
| 114 |
.IX Header "NOTES" |
| 115 |
ESS has been defined in RFC 2634, which has been updated in RFC 5035 |
| 116 |
(ESS version 2) to support hash algorithms other than SHA\-1. |
| 117 |
This is used for TSP (RFC 3161) and CAdES-BES (informational RFC 5126). |
| 118 |
.SH "RETURN VALUES" |
| 119 |
.IX Header "RETURN VALUES" |
| 120 |
\&\fBOSSL_ESS_signing_cert_new_init()\fR and \fBOSSL_ESS_signing_cert_v2_new_init()\fR |
| 121 |
return a pointer to the new structure or NULL on malloc failure. |
| 122 |
.PP |
| 123 |
\&\fBOSSL_ESS_check_signing_certs()\fR returns 1 on success, |
| 124 |
0 if a required certificate cannot be found, \-1 on other error. |
| 125 |
.SH "SEE ALSO" |
| 126 |
.IX Header "SEE ALSO" |
| 127 |
\&\fBTS_VERIFY_CTX_set_certs\fR\|(3), |
| 128 |
\&\fBCMS_verify\fR\|(3) |
| 129 |
.SH HISTORY |
| 130 |
.IX Header "HISTORY" |
| 131 |
\&\fBOSSL_ESS_signing_cert_new_init()\fR, \fBOSSL_ESS_signing_cert_v2_new_init()\fR, and |
| 132 |
\&\fBOSSL_ESS_check_signing_certs()\fR were added in OpenSSL 3.0. |
| 133 |
.SH COPYRIGHT |
| 134 |
.IX Header "COPYRIGHT" |
| 135 |
Copyright 2021\-2022 The OpenSSL Project Authors. All Rights Reserved. |
| 136 |
.PP |
| 137 |
Licensed under the Apache License 2.0 (the "License"). You may not use |
| 138 |
this file except in compliance with the License. You can obtain a copy |
| 139 |
in the file LICENSE in the source distribution or at |
| 140 |
<https://www.openssl.org/source/license.html>. |