2
0

OSSL_CMP_ITAV_new_caCerts.pod 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. =pod
  2. =head1 NAME
  3. OSSL_CMP_ITAV_new_caCerts,
  4. OSSL_CMP_ITAV_get0_caCerts,
  5. OSSL_CMP_ITAV_new_rootCaCert,
  6. OSSL_CMP_ITAV_get0_rootCaCert,
  7. OSSL_CMP_ITAV_new_rootCaKeyUpdate,
  8. OSSL_CMP_ITAV_get0_rootCaKeyUpdate
  9. - CMP utility functions for handling specific genm and genp messages
  10. =head1 SYNOPSIS
  11. #include <openssl/cmp.h>
  12. OSSL_CMP_ITAV *OSSL_CMP_ITAV_new_caCerts(const STACK_OF(X509) *caCerts);
  13. int OSSL_CMP_ITAV_get0_caCerts(const OSSL_CMP_ITAV *itav, STACK_OF(X509) **out);
  14. OSSL_CMP_ITAV *OSSL_CMP_ITAV_new_rootCaCert(const X509 *rootCaCert);
  15. int OSSL_CMP_ITAV_get0_rootCaCert(const OSSL_CMP_ITAV *itav, X509 **out);
  16. OSSL_CMP_ITAV *OSSL_CMP_ITAV_new_rootCaKeyUpdate(const X509 *newWithNew,
  17. const X509 *newWithOld,
  18. const X509 *oldWithNew);
  19. int OSSL_CMP_ITAV_get0_rootCaKeyUpdate(const OSSL_CMP_ITAV *itav,
  20. X509 **newWithNew,
  21. X509 **newWithOld,
  22. X509 **oldWithNew);
  23. =head1 DESCRIPTION
  24. ITAV is short for InfoTypeAndValue.
  25. OSSL_CMP_ITAV_new_caCerts() creates an B<OSSL_CMP_ITAV> structure of type
  26. B<caCerts> and fills it with a copy of the provided list of certificates.
  27. The I<caCerts> argument may be NULL or contain any number of certificates.
  28. OSSL_CMP_ITAV_get0_caCerts() requires that I<itav> has type B<caCerts>.
  29. It assigns NULL to I<*out> if there are no CA certificates in I<itav>, otherwise
  30. the internal pointer of type B<STACK_OF(X509)> with the certificates present.
  31. OSSL_CMP_ITAV_new_rootCaCert() creates a new B<OSSL_CMP_ITAV> structure
  32. of type B<rootCaCert> that includes the optionally given certificate.
  33. OSSL_CMP_ITAV_get0_rootCaCert() requires that I<itav> has type B<rootCaCert>.
  34. It assigns NULL to I<*out> if no certificate is included in I<itav>, otherwise
  35. the internal pointer to the certificate contained in the infoValue field.
  36. OSSL_CMP_ITAV_new_rootCaKeyUpdate() creates a new B<OSSL_CMP_ITAV> structure
  37. of type B<rootCaKeyUpdate> that includes an RootCaKeyUpdateContent structure
  38. with the optional I<newWithNew>, I<newWithOld>, and I<oldWithNew> certificates.
  39. An RootCaKeyUpdateContent structure is included only if I<newWithNew>
  40. is not NULL.
  41. OSSL_CMP_ITAV_get0_rootCaKeyUpdate() requires that I<itav> has infoType
  42. B<rootCaKeyUpdate>.
  43. If an update of a root CA certificate is included,
  44. it assigns to I<*newWithNew> the internal pointer
  45. to the certificate contained in the newWithNew infoValue sub-field of I<itav>.
  46. If I<newWithOld> is not NULL, it assigns to I<*newWithOld> the internal pointer
  47. to the certificate contained in the newWithOld infoValue sub-field of I<itav>.
  48. If I<oldWithNew> is not NULL, it assigns to I<*oldWithNew> the internal pointer
  49. to the certificate contained in the oldWithNew infoValue sub-field of I<itav>.
  50. Each of these pointers will be set to NULL if no root CA certificate update
  51. is present or the respective sub-field is not included.
  52. =head1 NOTES
  53. CMP is defined in RFC 4210.
  54. =head1 RETURN VALUES
  55. OSSL_CMP_ITAV_new_caCerts(),
  56. OSSL_CMP_ITAV_new_rootCaCert(), and OSSL_CMP_ITAV_new_rootCaKeyUpdate()
  57. return a pointer to the new ITAV structure on success, or NULL on error.
  58. OSSL_CMP_ITAV_get0_caCerts(),
  59. OSSL_CMP_ITAV_get0_rootCaCert(), and OSSL_CMP_ITAV_get0_rootCaKeyUpdate()
  60. return 1 on success, 0 on error.
  61. =head1 SEE ALSO
  62. L<OSSL_CMP_ITAV_create(3)> and L<OSSL_CMP_ITAV_get0_type(3)>
  63. =head1 HISTORY
  64. OSSL_CMP_ITAV_new_caCerts(), OSSL_CMP_ITAV_get0_caCerts(),
  65. OSSL_CMP_ITAV_new_rootCaCert(), OSSL_CMP_ITAV_get0_rootCaCert(),
  66. OSSL_CMP_ITAV_new_rootCaKeyUpdate(), and OSSL_CMP_ITAV_get0_rootCaKeyUpdate()
  67. were added in OpenSSL 3.2.
  68. =head1 COPYRIGHT
  69. Copyright 2022-2023 The OpenSSL Project Authors. All Rights Reserved.
  70. Licensed under the Apache License 2.0 (the "License"). You may not use
  71. this file except in compliance with the License. You can obtain a copy
  72. in the file LICENSE in the source distribution or at
  73. L<https://www.openssl.org/source/license.html>.
  74. =cut