OSSL_CMP_ITAV_new_caCerts.pod 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. OSSL_CMP_ITAV_get0_rootCaKeyUpdate() requires that I<itav> has infoType
  40. B<rootCaKeyUpdate>.
  41. If an update of a root CA certificate is included,
  42. it assigns to I<*newWithNew> the internal pointer
  43. to the certificate contained in the newWithNew infoValue sub-field of I<itav>.
  44. If I<newWithOld> is not NULL, it assigns to I<*newWithOld> the internal pointer
  45. to the certificate contained in the newWithOld infoValue sub-field of I<itav>.
  46. If I<oldWithNew> is not NULL, it assigns to I<*oldWithNew> the internal pointer
  47. to the certificate contained in the oldWithNew infoValue sub-field of I<itav>.
  48. Each of these pointers will be NULL if the respective sub-field is not set.
  49. =head1 NOTES
  50. CMP is defined in RFC 4210.
  51. =head1 RETURN VALUES
  52. OSSL_CMP_ITAV_new_caCerts(),
  53. OSSL_CMP_ITAV_new_rootCaCert(), and OSSL_CMP_ITAV_new_rootCaKeyUpdate()
  54. return a pointer to the new ITAV structure on success, or NULL on error.
  55. OSSL_CMP_ITAV_get0_caCerts(),
  56. OSSL_CMP_ITAV_get0_rootCaCert(), and OSSL_CMP_ITAV_get0_rootCaKeyUpdate()
  57. return 1 on success, 0 on error.
  58. =head1 SEE ALSO
  59. L<OSSL_CMP_ITAV_create(3)> and L<OSSL_CMP_ITAV_get0_type(3)>
  60. =head1 HISTORY
  61. OSSL_CMP_ITAV_new_caCerts(), OSSL_CMP_ITAV_get0_caCerts(),
  62. OSSL_CMP_ITAV_new_rootCaCert(), OSSL_CMP_ITAV_get0_rootCaCert(),
  63. OSSL_CMP_ITAV_new_rootCaKeyUpdate(), and OSSL_CMP_ITAV_get0_rootCaKeyUpdate()
  64. were added in OpenSSL 3.2.
  65. =head1 COPYRIGHT
  66. Copyright 2022-2023 The OpenSSL Project Authors. All Rights Reserved.
  67. Licensed under the Apache License 2.0 (the "License"). You may not use
  68. this file except in compliance with the License. You can obtain a copy
  69. in the file LICENSE in the source distribution or at
  70. L<https://www.openssl.org/source/license.html>.
  71. =cut