1CMS_get0_SignerInfos(3)             OpenSSL            CMS_get0_SignerInfos(3)
2
3
4

NAME

6        CMS_get0_SignerInfos, CMS_SignerInfo_get0_signer_id, CMS_SignerInfo_cert_cmp, CMS_set1_signer_certs - CMS signedData signer functions.
7

SYNOPSIS

9        #include <openssl/cms.h>
10
11        STACK_OF(CMS_SignerInfo) *CMS_get0_SignerInfos(CMS_ContentInfo *cms);
12
13        int CMS_SignerInfo_get0_signer_id(CMS_SignerInfo *si, ASN1_OCTET_STRING **keyid, X509_NAME **issuer, ASN1_INTEGER **sno);
14        int CMS_SignerInfo_cert_cmp(CMS_SignerInfo *si, X509 *cert);
15        void CMS_SignerInfo_set1_signer_cert(CMS_SignerInfo *si, X509 *signer);
16

DESCRIPTION

18       The function CMS_get0_SignerInfos() returns all the CMS_SignerInfo
19       structures associated with a CMS signedData structure.
20
21       CMS_SignerInfo_get0_signer_id() retrieves the certificate signer
22       identifier associated with a specific CMS_SignerInfo structure si.
23       Either the keyidentifier will be set in keyid or both issuer name and
24       serial number in issuer and sno.
25
26       CMS_SignerInfo_cert_cmp() compares the certificate cert against the
27       signer identifier si. It returns zero if the comparison is successful
28       and non zero if not.
29
30       CMS_SignerInfo_set1_signer_cert() sets the signers certificate of si to
31       signer.
32

NOTES

34       The main purpose of these functions is to enable an application to
35       lookup signers certificates using any appropriate technique when the
36       simpler method of CMS_verify() is not appropriate.
37
38       In typical usage and application will retrieve all CMS_SignerInfo
39       structures using CMS_get0_SignerInfo() and retrieve the identifier
40       information using CMS. It will then obtain the signer certificate by
41       some unspecified means (or return and error if it cannot be found) and
42       set it using CMS_SignerInfo_set1_signer_cert().
43
44       Once all signer certificates have been set CMS_verify() can be used.
45
46       Although CMS_get0_SignerInfos() can return NULL is an error occur or if
47       there are no signers this is not a problem in practice because the only
48       error which can occur is if the cms structure is not of type signedData
49       due to application error.
50

RETURN VALUES

52       CMS_get0_SignerInfos() returns all CMS_SignerInfo structures, or NULL
53       there are no signers or an error occurs.
54
55       CMS_SignerInfo_get0_signer_id() returns 1 for success and 0 for
56       failure.
57
58       CMS_SignerInfo_cert_cmp() returns 0 for a successful comparison and non
59       zero otherwise.
60
61       CMS_SignerInfo_set1_signer_cert() does not return a value.
62
63       Any error can be obtained from ERR_get_error(3)
64

SEE ALSO

66       ERR_get_error(3), CMS_verify(3)
67

HISTORY

69       These functions were first was added to OpenSSL 0.9.8
70
71
72
731.0.1e                            2013-02-11           CMS_get0_SignerInfos(3)
Impressum