CMS_get1_ReceiptRequest.pod 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. =pod
  2. =head1 NAME
  3. CMS_ReceiptRequest_create0, CMS_add1_ReceiptRequest, CMS_get1_ReceiptRequest, CMS_ReceiptRequest_get0_values - CMS signed receipt request functions
  4. =head1 SYNOPSIS
  5. #include <openssl/cms.h>
  6. CMS_ReceiptRequest *CMS_ReceiptRequest_create0(unsigned char *id, int idlen,
  7. int allorfirst,
  8. STACK_OF(GENERAL_NAMES) *receiptList,
  9. STACK_OF(GENERAL_NAMES) *receiptsTo);
  10. int CMS_add1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest *rr);
  11. int CMS_get1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest **prr);
  12. void CMS_ReceiptRequest_get0_values(CMS_ReceiptRequest *rr, ASN1_STRING **pcid,
  13. int *pallorfirst,
  14. STACK_OF(GENERAL_NAMES) **plist,
  15. STACK_OF(GENERAL_NAMES) **prto);
  16. =head1 DESCRIPTION
  17. CMS_ReceiptRequest_create0() creates a signed receipt request structure. The
  18. B<signedContentIdentifier> field is set using B<id> and B<idlen>, or it is set
  19. to 32 bytes of pseudo random data if B<id> is NULL. If B<receiptList> is NULL
  20. the allOrFirstTier option in B<receiptsFrom> is used and set to the value of
  21. the B<allorfirst> parameter. If B<receiptList> is not NULL the B<receiptList>
  22. option in B<receiptsFrom> is used. The B<receiptsTo> parameter specifies the
  23. B<receiptsTo> field value.
  24. The CMS_add1_ReceiptRequest() function adds a signed receipt request B<rr>
  25. to SignerInfo structure B<si>.
  26. int CMS_get1_ReceiptRequest() looks for a signed receipt request in B<si>, if
  27. any is found it is decoded and written to B<prr>.
  28. CMS_ReceiptRequest_get0_values() retrieves the values of a receipt request.
  29. The signedContentIdentifier is copied to B<pcid>. If the B<allOrFirstTier>
  30. option of B<receiptsFrom> is used its value is copied to B<pallorfirst>
  31. otherwise the B<receiptList> field is copied to B<plist>. The B<receiptsTo>
  32. parameter is copied to B<prto>.
  33. =head1 NOTES
  34. For more details of the meaning of the fields see RFC2634.
  35. The contents of a signed receipt should only be considered meaningful if the
  36. corresponding CMS_ContentInfo structure can be successfully verified using
  37. CMS_verify().
  38. =head1 RETURN VALUES
  39. CMS_ReceiptRequest_create0() returns a signed receipt request structure or
  40. NULL if an error occurred.
  41. CMS_add1_ReceiptRequest() returns 1 for success or 0 if an error occurred.
  42. CMS_get1_ReceiptRequest() returns 1 is a signed receipt request is found and
  43. decoded. It returns 0 if a signed receipt request is not present and -1 if
  44. it is present but malformed.
  45. =head1 SEE ALSO
  46. L<ERR_get_error(3)>, L<CMS_sign(3)>,
  47. L<CMS_sign_receipt(3)>, L<CMS_verify(3)>
  48. L<CMS_verify_receipt(3)>
  49. =head1 COPYRIGHT
  50. Copyright 2008-2018 The OpenSSL Project Authors. All Rights Reserved.
  51. Licensed under the OpenSSL license (the "License"). You may not use
  52. this file except in compliance with the License. You can obtain a copy
  53. in the file LICENSE in the source distribution or at
  54. L<https://www.openssl.org/source/license.html>.
  55. =cut