OSSL_CMP_MSG_http_perform.pod 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. =pod
  2. =head1 NAME
  3. OSSL_CMP_MSG_http_perform
  4. - client-side HTTP(S) transfer of a CMP request-response pair
  5. =head1 SYNOPSIS
  6. #include <openssl/cmp.h>
  7. OSSL_CMP_MSG *OSSL_CMP_MSG_http_perform(OSSL_CMP_CTX *ctx,
  8. const OSSL_CMP_MSG *req);
  9. =head1 DESCRIPTION
  10. OSSL_CMP_MSG_http_perform() sends the given PKIMessage B<req>
  11. to the CMP server specified in B<ctx> via L<OSSL_CMP_CTX_set1_server(3)>
  12. and optionally L<OSSL_CMP_CTX_set_serverPort(3)>, using
  13. any "CMP alias" optionally specified via L<OSSL_CMP_CTX_set1_serverPath(3)>.
  14. The default port is 80 for HTTP and 443 for HTTPS; the default path is "/".
  15. On success the function returns the server's response PKIMessage.
  16. The function makes use of any HTTP callback function
  17. set via L<OSSL_CMP_CTX_set_http_cb(3)>.
  18. It respects any timeout value set via L<OSSL_CMP_CTX_set_option(3)>
  19. with an B<OSSL_CMP_OPT_MSG_TIMEOUT> argument.
  20. It also respects any HTTP(S) proxy options set via L<OSSL_CMP_CTX_set1_proxy(3)>
  21. and L<OSSL_CMP_CTX_set1_no_proxy(3)> and the respective environment variables.
  22. Proxying plain HTTP is supported directly,
  23. while using a proxy for HTTPS connections requires a suitable callback function
  24. such as L<OSSL_HTTP_proxy_connect(3)>.
  25. =head1 NOTES
  26. CMP is defined in RFC 4210.
  27. HTTP transfer for CMP is defined in RFC 6712.
  28. =head1 RETURN VALUES
  29. OSSL_CMP_MSG_http_perform() returns a CMP message on success, else NULL.
  30. =head1 SEE ALSO
  31. L<OSSL_CMP_CTX_new(3)>, L<OSSL_HTTP_proxy_connect(3)>.
  32. =head1 HISTORY
  33. The OpenSSL CMP support was added in OpenSSL 3.0.
  34. =head1 COPYRIGHT
  35. Copyright 2007-2020 The OpenSSL Project Authors. All Rights Reserved.
  36. Licensed under the Apache License 2.0 (the "License"). You may not use
  37. this file except in compliance with the License. You can obtain a copy
  38. in the file LICENSE in the source distribution or at
  39. L<https://www.openssl.org/source/license.html>.
  40. =cut