OSSL_CMP_STATUSINFO_new.pod 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. =pod
  2. =head1 NAME
  3. OSSL_CMP_STATUSINFO_new,
  4. OSSL_CMP_snprint_PKIStatusInfo,
  5. OSSL_CMP_CTX_snprint_PKIStatus
  6. - function(s) for managing the CMP PKIStatus
  7. =head1 SYNOPSIS
  8. #include <openssl/cmp.h>
  9. OSSL_CMP_PKISI *OSSL_CMP_STATUSINFO_new(int status, int fail_info,
  10. const char *text);
  11. char *OSSL_CMP_snprint_PKIStatusInfo(const OSSL_CMP_PKISI *statusInfo,
  12. char *buf, size_t bufsize);
  13. char *OSSL_CMP_CTX_snprint_PKIStatus(const OSSL_CMP_CTX *ctx, char *buf,
  14. size_t bufsize);
  15. =head1 DESCRIPTION
  16. This is the PKIStatus API for using CMP (Certificate Management Protocol) with
  17. OpenSSL.
  18. OSSL_CMP_STATUSINFO_new() creates a new PKIStatusInfo structure
  19. and fills in the given values.
  20. It sets the status field to I<status>,
  21. copies I<text> (unless it is NULL) to statusString,
  22. and interprets I<fail_info> as bit pattern for the failInfo field.
  23. OSSL_CMP_snprint_PKIStatusInfo() places a human-readable string
  24. representing the given statusInfo
  25. in the given buffer, with the given maximal length.
  26. OSSL_CMP_CTX_snprint_PKIStatus() places a human-readable string
  27. representing the PKIStatusInfo components of the CMP context I<ctx>
  28. in the given buffer, with the given maximal length.
  29. =head1 NOTES
  30. CMP is defined in RFC 4210 (and CRMF in RFC 4211).
  31. =head1 RETURN VALUES
  32. OSSL_CMP_STATUSINFO_new()
  33. returns a pointer to the structure on success, or NULL on error.
  34. OSSL_CMP_snprint_PKIStatusInfo() and
  35. OSSL_CMP_CTX_snprint_PKIStatus()
  36. return a copy of the buffer pointer containing the string or NULL on error.
  37. =head1 HISTORY
  38. The OpenSSL CMP support was added in OpenSSL 3.0.
  39. =head1 COPYRIGHT
  40. Copyright 2007-2021 The OpenSSL Project Authors. All Rights Reserved.
  41. Licensed under the Apache License 2.0 (the "License"). You may not use
  42. this file except in compliance with the License. You can obtain a copy
  43. in the file LICENSE in the source distribution or at
  44. L<https://www.openssl.org/source/license.html>.
  45. =cut