summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorschwarze <>2019-08-17 15:23:26 +0000
committerschwarze <>2019-08-17 15:23:26 +0000
commit34632f990b58b7428f0342e7233269b003e3008c (patch)
tree53b8a945c3d7056e50a9e271f26c602600e856c5 /src
parent828cf47420406660396ab34261a41d0fcd3ec1bb (diff)
downloadopenbsd-34632f990b58b7428f0342e7233269b003e3008c.tar.gz
openbsd-34632f990b58b7428f0342e7233269b003e3008c.tar.bz2
openbsd-34632f990b58b7428f0342e7233269b003e3008c.zip
some cleanup:
* add the missing STANDARDS section * more precision below RETURN VALUES * simplify some overly verbose text * mark up ASN.1 type names * and minor wording improvements and typo fixes
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/man/CMS_get0_SignerInfos.390
1 files changed, 46 insertions, 44 deletions
diff --git a/src/lib/libcrypto/man/CMS_get0_SignerInfos.3 b/src/lib/libcrypto/man/CMS_get0_SignerInfos.3
index 8f98c181ab..70cb1c2c1e 100644
--- a/src/lib/libcrypto/man/CMS_get0_SignerInfos.3
+++ b/src/lib/libcrypto/man/CMS_get0_SignerInfos.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: CMS_get0_SignerInfos.3,v 1.4 2019/08/11 12:46:38 schwarze Exp $ 1.\" $OpenBSD: CMS_get0_SignerInfos.3,v 1.5 2019/08/17 15:23:26 schwarze Exp $
2.\" full merge up to: OpenSSL 83cf7abf May 29 13:07:08 2018 +0100 2.\" full merge up to: OpenSSL 83cf7abf May 29 13:07:08 2018 +0100
3.\" 3.\"
4.\" This file was written by Dr. Stephen Henson <steve@openssl.org>. 4.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
@@ -48,7 +48,7 @@
48.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 48.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
49.\" OF THE POSSIBILITY OF SUCH DAMAGE. 49.\" OF THE POSSIBILITY OF SUCH DAMAGE.
50.\" 50.\"
51.Dd $Mdocdate: August 11 2019 $ 51.Dd $Mdocdate: August 17 2019 $
52.Dt CMS_GET0_SIGNERINFOS 3 52.Dt CMS_GET0_SIGNERINFOS 3
53.Os 53.Os
54.Sh NAME 54.Sh NAME
@@ -57,7 +57,7 @@
57.Nm CMS_SignerInfo_get0_signature , 57.Nm CMS_SignerInfo_get0_signature ,
58.Nm CMS_SignerInfo_cert_cmp , 58.Nm CMS_SignerInfo_cert_cmp ,
59.Nm CMS_SignerInfo_set1_signer_cert 59.Nm CMS_SignerInfo_set1_signer_cert
60.Nd CMS signedData signer functions 60.Nd CMS SignedData signer functions
61.Sh SYNOPSIS 61.Sh SYNOPSIS
62.In openssl/cms.h 62.In openssl/cms.h
63.Ft STACK_OF(CMS_SignerInfo) * 63.Ft STACK_OF(CMS_SignerInfo) *
@@ -78,7 +78,7 @@
78.Ft int 78.Ft int
79.Fo CMS_SignerInfo_cert_cmp 79.Fo CMS_SignerInfo_cert_cmp
80.Fa "CMS_SignerInfo *si" 80.Fa "CMS_SignerInfo *si"
81.Fa "X509 *cert" 81.Fa "X509 *certificate"
82.Fc 82.Fc
83.Ft void 83.Ft void
84.Fo CMS_SignerInfo_set1_signer_cert 84.Fo CMS_SignerInfo_set1_signer_cert
@@ -86,96 +86,98 @@
86.Fa "X509 *signer" 86.Fa "X509 *signer"
87.Fc 87.Fc
88.Sh DESCRIPTION 88.Sh DESCRIPTION
89The function
90.Fn CMS_get0_SignerInfos 89.Fn CMS_get0_SignerInfos
91returns all the 90returns all the
92.Vt CMS_SignerInfo 91.Vt SignerInfo
93structures associated with a CMS signedData structure. 92structures associated with the
93.Vt SignedData
94structure
95.Fa cms .
94.Pp 96.Pp
95.Fn CMS_SignerInfo_get0_signer_id 97.Fn CMS_SignerInfo_get0_signer_id
96retrieves the certificate signer identifier associated with a specific 98retrieves the certificate
97.Vt CMS_SignerInfo 99.Vt SignerIdentifier
100associated with the
101.Vt SignerInfo
98structure 102structure
99.Fa si . 103.Fa si .
100Either the keyidentifier will be set in 104Either the
105.Vt SubjectKeyIdentifier
106will be set in
101.Fa keyid 107.Fa keyid
102or 108or both issuer name and serial number in
103.Em both
104issuer name and serial number in
105.Fa issuer 109.Fa issuer
106and 110and
107.Fa sno . 111.Fa sno .
108.Pp 112.Pp
109.Fn CMS_SignerInfo_get0_signature 113.Fn CMS_SignerInfo_get0_signature
110retrieves the signature associated with 114retrieves the
111.Fa si 115.Fa signature
112in a pointer to an 116field of
113.Vt ASN1_OCTET_STRING 117.Fa si .
114structure. 118The application program is allowed to modify the data pointed to.
115This pointer returned corresponds to the internal signature value of
116.Fa si
117so it may be read or modified.
118.Pp 119.Pp
119.Fn CMS_SignerInfo_cert_cmp 120.Fn CMS_SignerInfo_cert_cmp
120compares the certificate 121compares the
121.Fa cert 122.Fa certificate
122against the signer identifier 123against the signer identifier of
123.Fa si . 124.Fa si .
124It returns zero if the comparison is successful or non-zero if not.
125.Pp 125.Pp
126.Fn CMS_SignerInfo_set1_signer_cert 126.Fn CMS_SignerInfo_set1_signer_cert
127sets the signers certificate of 127sets the signer certificate of
128.Fa si 128.Fa si
129to 129to
130.Fa signer . 130.Fa signer .
131.Pp 131.Pp
132The main purpose of these functions is to enable an application to 132The main purpose of these functions is to enable an application to
133lookup signers certificates using any appropriate technique when the 133look up signer certificates using any appropriate technique when the
134simpler method of 134simpler method of
135.Xr CMS_verify 3 135.Xr CMS_verify 3
136is not appropriate. 136is not appropriate.
137.Pp 137.Pp
138In typical usage an application will retrieve all 138In typical usage, an application retrieves all
139.Vt CMS_SignerInfo 139.Vt CMS_SignerInfo
140structures using 140structures using
141.Fn CMS_get0_SignerInfos 141.Fn CMS_get0_SignerInfos
142and retrieve the identifier information using CMS. 142and retrieves the identifier information using CMS.
143It will then obtain the signer certificate by some unspecified means 143It will then obtain the signer certificate by some unspecified means
144(or return and error if it cannot be found) and set it using 144(or return and error if it cannot be found) and set it using
145.Fn CMS_SignerInfo_set1_signer_cert . 145.Fn CMS_SignerInfo_set1_signer_cert .
146.Pp
147Once all signer certificates have been set, 146Once all signer certificates have been set,
148.Xr CMS_verify 3 147.Xr CMS_verify 3
149can be used. 148can be used.
150.Pp
151Although
152.Fn CMS_get0_SignerInfos
153can return
154.Dv NULL
155if an error occurs
156.Em or
157if there are no signers, this is not a problem in practice because the
158only error which can occur is if the
159.Fa cms
160structure is not of type signedData due to application error.
161.Sh RETURN VALUES 149.Sh RETURN VALUES
162.Fn CMS_get0_SignerInfos 150.Fn CMS_get0_SignerInfos
163returns all 151returns an internal pointer to all the
164.Vt CMS_SignerInfo 152.Vt CMS_SignerInfo
165structures, or 153structures, or
166.Dv NULL 154.Dv NULL
167if there are no signers or an error occurs. 155if there are no signers or if
156.Fa cms
157is not of the type
158.Vt SignedData .
168.Pp 159.Pp
169.Fn CMS_SignerInfo_get0_signer_id 160.Fn CMS_SignerInfo_get0_signer_id
170returns 1 for success or 0 for failure. 161returns 1 for success or 0 for failure.
171.Pp 162.Pp
163.Fn CMS_SignerInfo_get0_signature
164returns an internal pointer to the signature.
165.Pp
172.Fn CMS_SignerInfo_cert_cmp 166.Fn CMS_SignerInfo_cert_cmp
173returns 0 for a successful comparison or non-zero otherwise. 167returns 0 for a match or non-zero otherwise.
174.Pp 168.Pp
175Any error can be obtained from 169Any error can be obtained from
176.Xr ERR_get_error 3 . 170.Xr ERR_get_error 3 .
177.Sh SEE ALSO 171.Sh SEE ALSO
178.Xr CMS_verify 3 172.Xr CMS_verify 3
173.Sh STANDARDS
174RFC 5652: Cryptographic Message Syntax (CMS)
175.Bl -dash -compact -offset indent
176.It
177section 5.1: SignedData Type
178.It
179section 5.3: SignerInfo Type
180.El
179.Sh HISTORY 181.Sh HISTORY
180.Fn CMS_get0_SignerInfos , 182.Fn CMS_get0_SignerInfos ,
181.Fn CMS_SignerInfo_get0_signer_id , 183.Fn CMS_SignerInfo_get0_signer_id ,