Look for comma before - in POD pages
[openssl.git] / doc / man3 / CMS_add0_cert.pod
1 =pod
2
3 =head1 NAME
4
5 CMS_add0_cert, CMS_add1_cert, CMS_get1_certs, CMS_add0_crl, CMS_add1_crl, CMS_get1_crls
6 - CMS certificate and CRL utility functions
7
8 =head1 SYNOPSIS
9
10  #include <openssl/cms.h>
11
12  int CMS_add0_cert(CMS_ContentInfo *cms, X509 *cert);
13  int CMS_add1_cert(CMS_ContentInfo *cms, X509 *cert);
14  STACK_OF(X509) *CMS_get1_certs(CMS_ContentInfo *cms);
15
16  int CMS_add0_crl(CMS_ContentInfo *cms, X509_CRL *crl);
17  int CMS_add1_crl(CMS_ContentInfo *cms, X509_CRL *crl);
18  STACK_OF(X509_CRL) *CMS_get1_crls(CMS_ContentInfo *cms);
19
20
21 =head1 DESCRIPTION
22
23 CMS_add0_cert() and CMS_add1_cert() add certificate B<cert> to B<cms>.
24 must be of type signed data or enveloped data.
25
26 CMS_get1_certs() returns all certificates in B<cms>.
27
28 CMS_add0_crl() and CMS_add1_crl() add CRL B<crl> to B<cms>. CMS_get1_crls()
29 returns any CRLs in B<cms>.
30
31 =head1 NOTES
32
33 The CMS_ContentInfo structure B<cms> must be of type signed data or enveloped
34 data or an error will be returned.
35
36 For signed data certificates and CRLs are added to the B<certificates> and
37 B<crls> fields of SignedData structure. For enveloped data they are added to
38 B<OriginatorInfo>.
39
40 As the B<0> implies CMS_add0_cert() adds B<cert> internally to B<cms> and it
41 must not be freed up after the call as opposed to CMS_add1_cert() where B<cert>
42 must be freed up.
43
44 The same certificate or CRL must not be added to the same cms structure more
45 than once.
46
47 =head1 RETURN VALUES
48
49 CMS_add0_cert(), CMS_add1_cert() and CMS_add0_crl() and CMS_add1_crl() return
50 1 for success and 0 for failure.
51
52 CMS_get1_certs() and CMS_get1_crls() return the STACK of certificates or CRLs
53 or NULL if there are none or an error occurs. The only error which will occur
54 in practice is if the B<cms> type is invalid.
55
56 =head1 SEE ALSO
57
58 L<ERR_get_error(3)>,
59 L<CMS_sign(3)>,
60 L<CMS_encrypt(3)>
61
62 =head1 COPYRIGHT
63
64 Copyright 2008-2016 The OpenSSL Project Authors. All Rights Reserved.
65
66 Licensed under the OpenSSL license (the "License").  You may not use
67 this file except in compliance with the License.  You can obtain a copy
68 in the file LICENSE in the source distribution or at
69 L<https://www.openssl.org/source/license.html>.
70
71 =cut