1CMS_GET0_SIGNERINFOS(3) OpenSSL CMS_GET0_SIGNERINFOS(3)
2
3
4
6 CMS_SignerInfo_set1_signer_cert, CMS_get0_SignerInfos,
7 CMS_SignerInfo_get0_signer_id, CMS_SignerInfo_get0_signature,
8 CMS_SignerInfo_cert_cmp - CMS signedData signer functions
9
11 #include <openssl/cms.h>
12
13 STACK_OF(CMS_SignerInfo) *CMS_get0_SignerInfos(CMS_ContentInfo *cms);
14
15 int CMS_SignerInfo_get0_signer_id(CMS_SignerInfo *si, ASN1_OCTET_STRING **keyid,
16 X509_NAME **issuer, ASN1_INTEGER **sno);
17 ASN1_OCTET_STRING *CMS_SignerInfo_get0_signature(CMS_SignerInfo *si);
18 int CMS_SignerInfo_cert_cmp(CMS_SignerInfo *si, X509 *cert);
19 void CMS_SignerInfo_set1_signer_cert(CMS_SignerInfo *si, X509 *signer);
20
22 The function CMS_get0_SignerInfos() returns all the CMS_SignerInfo
23 structures associated with a CMS signedData structure.
24
25 CMS_SignerInfo_get0_signer_id() retrieves the certificate signer
26 identifier associated with a specific CMS_SignerInfo structure si.
27 Either the keyidentifier will be set in keyid or both issuer name and
28 serial number in issuer and sno.
29
30 CMS_SignerInfo_get0_signature() retrieves the signature associated with
31 si in a pointer to an ASN1_OCTET_STRING structure. This pointer
32 returned corresponds to the internal signature value if si so it may be
33 read or modified.
34
35 CMS_SignerInfo_cert_cmp() compares the certificate cert against the
36 signer identifier si. It returns zero if the comparison is successful
37 and non zero if not.
38
39 CMS_SignerInfo_set1_signer_cert() sets the signers certificate of si to
40 signer.
41
43 The main purpose of these functions is to enable an application to
44 lookup signers certificates using any appropriate technique when the
45 simpler method of CMS_verify() is not appropriate.
46
47 In typical usage and application will retrieve all CMS_SignerInfo
48 structures using CMS_get0_SignerInfo() and retrieve the identifier
49 information using CMS. It will then obtain the signer certificate by
50 some unspecified means (or return and error if it cannot be found) and
51 set it using CMS_SignerInfo_set1_signer_cert().
52
53 Once all signer certificates have been set CMS_verify() can be used.
54
55 Although CMS_get0_SignerInfos() can return NULL if an error occurs or
56 if there are no signers this is not a problem in practice because the
57 only error which can occur is if the cms structure is not of type
58 signedData due to application error.
59
61 CMS_get0_SignerInfos() returns all CMS_SignerInfo structures, or NULL
62 there are no signers or an error occurs.
63
64 CMS_SignerInfo_get0_signer_id() returns 1 for success and 0 for
65 failure.
66
67 CMS_SignerInfo_cert_cmp() returns 0 for a successful comparison and non
68 zero otherwise.
69
70 CMS_SignerInfo_set1_signer_cert() does not return a value.
71
72 Any error can be obtained from ERR_get_error(3)
73
75 ERR_get_error(3), CMS_verify(3)
76
78 Copyright 2008-2018 The OpenSSL Project Authors. All Rights Reserved.
79
80 Licensed under the OpenSSL license (the "License"). You may not use
81 this file except in compliance with the License. You can obtain a copy
82 in the file LICENSE in the source distribution or at
83 <https://www.openssl.org/source/license.html>.
84
85
86
871.1.1l 2021-09-15 CMS_GET0_SIGNERINFOS(3)