1CMS_add0_cert(3)                    OpenSSL                   CMS_add0_cert(3)
2
3
4

NAME

6       CMS_add0_cert, CMS_add1_cert, CMS_get1_certs, CMS_add0_crl,
7       CMS_add1_crl, CMS_get1_crls, - CMS certificate and CRL utility
8       functions
9

SYNOPSIS

11        #include <openssl/cms.h>
12
13        int CMS_add0_cert(CMS_ContentInfo *cms, X509 *cert);
14        int CMS_add1_cert(CMS_ContentInfo *cms, X509 *cert);
15        STACK_OF(X509) *CMS_get1_certs(CMS_ContentInfo *cms);
16
17        int CMS_add0_crl(CMS_ContentInfo *cms, X509_CRL *crl);
18        int CMS_add1_crl(CMS_ContentInfo *cms, X509_CRL *crl);
19        STACK_OF(X509_CRL) *CMS_get1_crls(CMS_ContentInfo *cms);
20

DESCRIPTION

22       CMS_add0_cert() and CMS_add1_cert() add certificate cert to cms.  must
23       be of type signed data or enveloped data.
24
25       CMS_get1_certs() returns all certificates in cms.
26
27       CMS_add0_crl() and CMS_add1_crl() add CRL crl to cms. CMS_get1_crls()
28       returns any CRLs in cms.
29

NOTES

31       The CMS_ContentInfo structure cms must be of type signed data or
32       enveloped data or an error will be returned.
33
34       For signed data certificates and CRLs are added to the certificates and
35       crls fields of SignedData structure. For enveloped data they are added
36       to OriginatorInfo.
37
38       As the 0 implies CMS_add0_cert() adds cert internally to cms and it
39       must not be freed up after the call as opposed to CMS_add1_cert() where
40       cert must be freed up.
41
42       The same certificate or CRL must not be added to the same cms structure
43       more than once.
44

RETURN VALUES

46       CMS_add0_cert(), CMS_add1_cert() and CMS_add0_crl() and CMS_add1_crl()
47       return 1 for success and 0 for failure.
48
49       CMS_get1_certs() and CMS_get1_crls() return the STACK of certificates
50       or CRLs or NULL if there are none or an error occurs. The only error
51       which will occur in practice is if the cms type is invalid.
52

SEE ALSO

54       ERR_get_error(3), CMS_sign(3), CMS_encrypt(3)
55

HISTORY

57       CMS_add0_cert(), CMS_add1_cert(), CMS_get1_certs(), CMS_add0_crl() and
58       CMS_get1_crls() were all first added to OpenSSL 0.9.8
59
60
61
621.0.2o                            2020-08-01                  CMS_add0_cert(3)
Impressum