xref: /freebsd/crypto/openssl/doc/man3/CMS_sign_receipt.pod (revision b077aed33b7b6aefca7b17ddb250cf521f938613)
1e71b7053SJung-uk Kim=pod
2e71b7053SJung-uk Kim
3e71b7053SJung-uk Kim=head1 NAME
4e71b7053SJung-uk Kim
5e71b7053SJung-uk KimCMS_sign_receipt - create a CMS signed receipt
6e71b7053SJung-uk Kim
7e71b7053SJung-uk Kim=head1 SYNOPSIS
8e71b7053SJung-uk Kim
9e71b7053SJung-uk Kim #include <openssl/cms.h>
10e71b7053SJung-uk Kim
11e71b7053SJung-uk Kim CMS_ContentInfo *CMS_sign_receipt(CMS_SignerInfo *si, X509 *signcert,
12e71b7053SJung-uk Kim                                   EVP_PKEY *pkey, STACK_OF(X509) *certs,
13e71b7053SJung-uk Kim                                   unsigned int flags);
14e71b7053SJung-uk Kim
15e71b7053SJung-uk Kim=head1 DESCRIPTION
16e71b7053SJung-uk Kim
17e71b7053SJung-uk KimCMS_sign_receipt() creates and returns a CMS signed receipt structure. B<si> is
18e71b7053SJung-uk Kimthe B<CMS_SignerInfo> structure containing the signed receipt request.
19e71b7053SJung-uk KimB<signcert> is the certificate to sign with, B<pkey> is the corresponding
20e71b7053SJung-uk Kimprivate key.  B<certs> is an optional additional set of certificates to include
21e71b7053SJung-uk Kimin the CMS structure (for example any intermediate CAs in the chain).
22e71b7053SJung-uk Kim
23e71b7053SJung-uk KimB<flags> is an optional set of flags.
24e71b7053SJung-uk Kim
25e71b7053SJung-uk Kim=head1 NOTES
26e71b7053SJung-uk Kim
27e71b7053SJung-uk KimThis functions behaves in a similar way to CMS_sign() except the flag values
28e71b7053SJung-uk KimB<CMS_DETACHED>, B<CMS_BINARY>, B<CMS_NOATTR>, B<CMS_TEXT> and B<CMS_STREAM>
29e71b7053SJung-uk Kimare not supported since they do not make sense in the context of signed
30e71b7053SJung-uk Kimreceipts.
31e71b7053SJung-uk Kim
32e71b7053SJung-uk Kim=head1 RETURN VALUES
33e71b7053SJung-uk Kim
34e71b7053SJung-uk KimCMS_sign_receipt() returns either a valid CMS_ContentInfo structure or NULL if
35e71b7053SJung-uk Kiman error occurred.  The error can be obtained from ERR_get_error(3).
36e71b7053SJung-uk Kim
37e71b7053SJung-uk Kim=head1 SEE ALSO
38e71b7053SJung-uk Kim
39e71b7053SJung-uk KimL<ERR_get_error(3)>,
40e71b7053SJung-uk KimL<CMS_verify_receipt(3)>,
41e71b7053SJung-uk KimL<CMS_sign(3)>
42e71b7053SJung-uk Kim
43e71b7053SJung-uk Kim=head1 COPYRIGHT
44e71b7053SJung-uk Kim
45e71b7053SJung-uk KimCopyright 2008-2016 The OpenSSL Project Authors. All Rights Reserved.
46e71b7053SJung-uk Kim
47*b077aed3SPierre ProncheryLicensed under the Apache License 2.0 (the "License").  You may not use
48e71b7053SJung-uk Kimthis file except in compliance with the License.  You can obtain a copy
49e71b7053SJung-uk Kimin the file LICENSE in the source distribution or at
50e71b7053SJung-uk KimL<https://www.openssl.org/source/license.html>.
51e71b7053SJung-uk Kim
52e71b7053SJung-uk Kim=cut
53