Blame doc/man3/CMS_get1_ReceiptRequest.pod

Packit c4476c
=pod
Packit c4476c
Packit c4476c
=head1 NAME
Packit c4476c
Packit c4476c
CMS_ReceiptRequest_create0, CMS_add1_ReceiptRequest, CMS_get1_ReceiptRequest, CMS_ReceiptRequest_get0_values - CMS signed receipt request functions
Packit c4476c
Packit c4476c
=head1 SYNOPSIS
Packit c4476c
Packit c4476c
 #include <openssl/cms.h>
Packit c4476c
Packit c4476c
 CMS_ReceiptRequest *CMS_ReceiptRequest_create0(unsigned char *id, int idlen,
Packit c4476c
                                                int allorfirst,
Packit c4476c
                                                STACK_OF(GENERAL_NAMES) *receiptList,
Packit c4476c
                                                STACK_OF(GENERAL_NAMES) *receiptsTo);
Packit c4476c
 int CMS_add1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest *rr);
Packit c4476c
 int CMS_get1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest **prr);
Packit c4476c
 void CMS_ReceiptRequest_get0_values(CMS_ReceiptRequest *rr, ASN1_STRING **pcid,
Packit c4476c
                                     int *pallorfirst,
Packit c4476c
                                     STACK_OF(GENERAL_NAMES) **plist,
Packit c4476c
                                     STACK_OF(GENERAL_NAMES) **prto);
Packit c4476c
Packit c4476c
=head1 DESCRIPTION
Packit c4476c
Packit c4476c
CMS_ReceiptRequest_create0() creates a signed receipt request structure. The
Packit c4476c
B<signedContentIdentifier> field is set using B<id> and B<idlen>, or it is set
Packit c4476c
to 32 bytes of pseudo random data if B<id> is NULL. If B<receiptList> is NULL
Packit c4476c
the allOrFirstTier option in B<receiptsFrom> is used and set to the value of
Packit c4476c
the B<allorfirst> parameter. If B<receiptList> is not NULL the B<receiptList>
Packit c4476c
option in B<receiptsFrom> is used. The B<receiptsTo> parameter specifies the
Packit c4476c
B<receiptsTo> field value.
Packit c4476c
Packit c4476c
The CMS_add1_ReceiptRequest() function adds a signed receipt request B<rr>
Packit c4476c
to SignerInfo structure B<si>.
Packit c4476c
Packit c4476c
int CMS_get1_ReceiptRequest() looks for a signed receipt request in B<si>, if
Packit c4476c
any is found it is decoded and written to B<prr>.
Packit c4476c
Packit c4476c
CMS_ReceiptRequest_get0_values() retrieves the values of a receipt request.
Packit c4476c
The signedContentIdentifier is copied to B<pcid>. If the B<allOrFirstTier>
Packit c4476c
option of B<receiptsFrom> is used its value is copied to B<pallorfirst>
Packit c4476c
otherwise the B<receiptList> field is copied to B<plist>. The B<receiptsTo>
Packit c4476c
parameter is copied to B<prto>.
Packit c4476c
Packit c4476c
=head1 NOTES
Packit c4476c
Packit c4476c
For more details of the meaning of the fields see RFC2634.
Packit c4476c
Packit c4476c
The contents of a signed receipt should only be considered meaningful if the
Packit c4476c
corresponding CMS_ContentInfo structure can be successfully verified using
Packit c4476c
CMS_verify().
Packit c4476c
Packit c4476c
=head1 RETURN VALUES
Packit c4476c
Packit c4476c
CMS_ReceiptRequest_create0() returns a signed receipt request structure or
Packit c4476c
NULL if an error occurred.
Packit c4476c
Packit c4476c
CMS_add1_ReceiptRequest() returns 1 for success or 0 if an error occurred.
Packit c4476c
Packit c4476c
CMS_get1_ReceiptRequest() returns 1 is a signed receipt request is found and
Packit c4476c
decoded. It returns 0 if a signed receipt request is not present and -1 if
Packit c4476c
it is present but malformed.
Packit c4476c
Packit c4476c
=head1 SEE ALSO
Packit c4476c
Packit c4476c
L<ERR_get_error(3)>, L<CMS_sign(3)>,
Packit c4476c
L<CMS_sign_receipt(3)>, L<CMS_verify(3)>
Packit c4476c
L<CMS_verify_receipt(3)>
Packit c4476c
Packit c4476c
=head1 COPYRIGHT
Packit c4476c
Packit c4476c
Copyright 2008-2018 The OpenSSL Project Authors. All Rights Reserved.
Packit c4476c
Packit c4476c
Licensed under the OpenSSL license (the "License").  You may not use
Packit c4476c
this file except in compliance with the License.  You can obtain a copy
Packit c4476c
in the file LICENSE in the source distribution or at
Packit c4476c
L<https://www.openssl.org/source/license.html>.
Packit c4476c
Packit c4476c
=cut