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