ossl_cmp_msg_create.pod 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. =pod
  2. =head1 NAME
  3. ossl_cmp_bodytype_to_string,
  4. ossl_cmp_msg_get_bodytype,
  5. ossl_cmp_msg_set_bodytype,
  6. ossl_cmp_msg_create,
  7. ossl_cmp_msg_gen_ITAV_push0,
  8. ossl_cmp_msg_gen_ITAVs_push1
  9. - functions manipulating CMP messages
  10. =head1 SYNOPSIS
  11. #include "cmp_local.h"
  12. const char *ossl_cmp_bodytype_to_string(int type);
  13. int ossl_cmp_msg_get_bodytype(const OSSL_CMP_MSG *msg);
  14. int ossl_cmp_msg_set_bodytype( OSSL_CMP_MSG *msg, int type);
  15. OSSL_CMP_MSG *ossl_cmp_msg_create(OSSL_CMP_CTX *ctx, int bodytype);
  16. int ossl_cmp_msg_gen_ITAV_push0(OSSL_CMP_MSG *msg, OSSL_CMP_ITAV *itav);
  17. int ossl_cmp_msg_gen_ITAVs_push1(OSSL_CMP_MSG *msg,
  18. STACK_OF(OSSL_CMP_ITAV) *itavs);
  19. =head1 DESCRIPTION
  20. ossl_cmp_bodytype_to_string() returns the name of the given body type as string,
  21. or "illegal body type" on error.
  22. ossl_cmp_msg_get_bodytype() returns the body type of the given PKIMessage,
  23. or -1 on error.
  24. ossl_cmp_msg_set_bodytype() sets the type of the message contained in
  25. the PKIMessage body field.
  26. Returns 1 on success, 0 on error.
  27. ossl_cmp_msg_create() creates and initializes a OSSL_CMP_MSG structure,
  28. using B<ctx> for the header and B<bodytype> for the body.
  29. Returns pointer to created OSSL_CMP_MSG on success, NULL on error.
  30. ossl_cmp_msg_gen_ITAV_push0() pushes the B<itav> to the body of the
  31. PKIMessage B<msg> of GenMsg or GenRep type. Consumes the B<itavs> pointer.
  32. Returns 1 on success, 0 on error.
  33. ossl_cmp_msg_gen_ITAVs_push1() adds a copy of the B<itavs> stack to the body
  34. of the PKIMessage B<msg> of GenMsg or GenRep type.
  35. Does not consume the B<itavs> pointer nor its elements.
  36. Returns 1 on success, 0 on error.
  37. =head1 NOTES
  38. CMP is defined in RFC 4210 (and CRMF in RFC 4211).
  39. =head1 RETURN VALUES
  40. See the individual functions above.
  41. =head1 SEE ALSO
  42. L<OSSL_CMP_CTX_new(3)>, L<OSSL_CMP_exec_certreq(3)>
  43. =head1 HISTORY
  44. The OpenSSL CMP support was added in OpenSSL 3.0.
  45. =head1 COPYRIGHT
  46. Copyright 2007-2020 The OpenSSL Project Authors. All Rights Reserved.
  47. Licensed under the Apache License 2.0 (the "License"). You may not use
  48. this file except in compliance with the License. You can obtain a copy
  49. in the file LICENSE in the source distribution or at
  50. L<https://www.openssl.org/source/license.html>.
  51. =cut