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, CMS_get1_crls, - CMS certificate and CRL utility functions
7

SYNOPSIS

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

DESCRIPTION

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

NOTES

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

RETURN VALUES

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

SEE ALSO

52       ERR_get_error(3), CMS_sign(3), CMS_encrypt(3)
53

HISTORY

55       CMS_add0_cert(), CMS_add1_cert(), CMS_get1_certs(), CMS_add0_crl() and
56       CMS_get1_crls() were all first added to OpenSSL 0.9.8
57
58
59
601.0.0e                            2008-05-02                  CMS_add0_cert(3)
Impressum