1CMS_get0_SignerInfos(3) OpenSSL CMS_get0_SignerInfos(3)
2
3
4
6 CMS_get0_SignerInfos, CMS_SignerInfo_get0_signer_id,
7 CMS_SignerInfo_get0_signature, CMS_SignerInfo_cert_cmp,
8 CMS_set1_signer_cert - 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, X509_NAME **issuer, ASN1_INTEGER **sno);
16 ASN1_OCTET_STRING *CMS_SignerInfo_get0_signature(CMS_SignerInfo *si);
17 int CMS_SignerInfo_cert_cmp(CMS_SignerInfo *si, X509 *cert);
18 void CMS_SignerInfo_set1_signer_cert(CMS_SignerInfo *si, X509 *signer);
19
21 The function CMS_get0_SignerInfos() returns all the CMS_SignerInfo
22 structures associated with a CMS signedData structure.
23
24 CMS_SignerInfo_get0_signer_id() retrieves the certificate signer
25 identifier associated with a specific CMS_SignerInfo structure si.
26 Either the keyidentifier will be set in keyid or both issuer name and
27 serial number in issuer and sno.
28
29 CMS_SignerInfo_get0_signature() retrieves the signature associated with
30 si in a pointer to an ASN1_OCTET_STRING structure. This pointer
31 returned corresponds to the internal signature value if si so it may be
32 read or modified.
33
34 CMS_SignerInfo_cert_cmp() compares the certificate cert against the
35 signer identifier si. It returns zero if the comparison is successful
36 and non zero if not.
37
38 CMS_SignerInfo_set1_signer_cert() sets the signers certificate of si to
39 signer.
40
42 The main purpose of these functions is to enable an application to
43 lookup signers certificates using any appropriate technique when the
44 simpler method of CMS_verify() is not appropriate.
45
46 In typical usage and application will retrieve all CMS_SignerInfo
47 structures using CMS_get0_SignerInfo() and retrieve the identifier
48 information using CMS. It will then obtain the signer certificate by
49 some unspecified means (or return and error if it cannot be found) and
50 set it using CMS_SignerInfo_set1_signer_cert().
51
52 Once all signer certificates have been set CMS_verify() can be used.
53
54 Although CMS_get0_SignerInfos() can return NULL is an error occur or if
55 there are no signers this is not a problem in practice because the only
56 error which can occur is if the cms structure is not of type signedData
57 due to application error.
58
60 CMS_get0_SignerInfos() returns all CMS_SignerInfo structures, or NULL
61 there are no signers or an error occurs.
62
63 CMS_SignerInfo_get0_signer_id() returns 1 for success and 0 for
64 failure.
65
66 CMS_SignerInfo_cert_cmp() returns 0 for a successful comparison and non
67 zero otherwise.
68
69 CMS_SignerInfo_set1_signer_cert() does not return a value.
70
71 Any error can be obtained from ERR_get_error(3)
72
74 ERR_get_error(3), CMS_verify(3)
75
77 These functions were first was added to OpenSSL 0.9.8
78
79
80
811.0.2o 2019-09-10 CMS_get0_SignerInfos(3)