xref: /freebsd-src/crypto/openssl/doc/man3/OSSL_CMP_MSG_http_perform.pod (revision b077aed33b7b6aefca7b17ddb250cf521f938613)
1*b077aed3SPierre Pronchery=pod
2*b077aed3SPierre Pronchery
3*b077aed3SPierre Pronchery=head1 NAME
4*b077aed3SPierre Pronchery
5*b077aed3SPierre ProncheryOSSL_CMP_MSG_http_perform
6*b077aed3SPierre Pronchery- client-side HTTP(S) transfer of a CMP request-response pair
7*b077aed3SPierre Pronchery
8*b077aed3SPierre Pronchery=head1 SYNOPSIS
9*b077aed3SPierre Pronchery
10*b077aed3SPierre Pronchery #include <openssl/cmp.h>
11*b077aed3SPierre Pronchery
12*b077aed3SPierre Pronchery OSSL_CMP_MSG *OSSL_CMP_MSG_http_perform(OSSL_CMP_CTX *ctx,
13*b077aed3SPierre Pronchery                                         const OSSL_CMP_MSG *req);
14*b077aed3SPierre Pronchery
15*b077aed3SPierre Pronchery=head1 DESCRIPTION
16*b077aed3SPierre Pronchery
17*b077aed3SPierre ProncheryOSSL_CMP_MSG_http_perform() sends the given PKIMessage I<req>
18*b077aed3SPierre Proncheryto the CMP server specified in I<ctx> via L<OSSL_CMP_CTX_set1_server(3)>
19*b077aed3SPierre Proncheryand optionally L<OSSL_CMP_CTX_set_serverPort(3)>, using
20*b077aed3SPierre Proncheryany "CMP alias" optionally specified via L<OSSL_CMP_CTX_set1_serverPath(3)>.
21*b077aed3SPierre ProncheryThe default port is 80 for HTTP and 443 for HTTPS; the default path is "/".
22*b077aed3SPierre ProncheryOn success the function returns the server's response PKIMessage.
23*b077aed3SPierre Pronchery
24*b077aed3SPierre ProncheryThe function makes use of any HTTP callback function
25*b077aed3SPierre Proncheryset via L<OSSL_CMP_CTX_set_http_cb(3)>.
26*b077aed3SPierre ProncheryIt respects any timeout value set via L<OSSL_CMP_CTX_set_option(3)>
27*b077aed3SPierre Proncherywith an B<OSSL_CMP_OPT_MSG_TIMEOUT> argument.
28*b077aed3SPierre ProncheryIt also respects any HTTP(S) proxy options set via L<OSSL_CMP_CTX_set1_proxy(3)>
29*b077aed3SPierre Proncheryand L<OSSL_CMP_CTX_set1_no_proxy(3)> and the respective environment variables.
30*b077aed3SPierre ProncheryProxying plain HTTP is supported directly,
31*b077aed3SPierre Proncherywhile using a proxy for HTTPS connections requires a suitable callback function
32*b077aed3SPierre Proncherysuch as L<OSSL_HTTP_proxy_connect(3)>.
33*b077aed3SPierre Pronchery
34*b077aed3SPierre Pronchery=head1 NOTES
35*b077aed3SPierre Pronchery
36*b077aed3SPierre ProncheryCMP is defined in RFC 4210.
37*b077aed3SPierre ProncheryHTTP transfer for CMP is defined in RFC 6712.
38*b077aed3SPierre Pronchery
39*b077aed3SPierre Pronchery=head1 RETURN VALUES
40*b077aed3SPierre Pronchery
41*b077aed3SPierre ProncheryOSSL_CMP_MSG_http_perform() returns a CMP message on success, else NULL.
42*b077aed3SPierre Pronchery
43*b077aed3SPierre Pronchery=head1 SEE ALSO
44*b077aed3SPierre Pronchery
45*b077aed3SPierre ProncheryL<OSSL_CMP_CTX_new(3)>, L<OSSL_HTTP_proxy_connect(3)>.
46*b077aed3SPierre Pronchery
47*b077aed3SPierre Pronchery=head1 HISTORY
48*b077aed3SPierre Pronchery
49*b077aed3SPierre ProncheryThe OpenSSL CMP support was added in OpenSSL 3.0.
50*b077aed3SPierre Pronchery
51*b077aed3SPierre Pronchery=head1 COPYRIGHT
52*b077aed3SPierre Pronchery
53*b077aed3SPierre ProncheryCopyright 2007-2021 The OpenSSL Project Authors. All Rights Reserved.
54*b077aed3SPierre Pronchery
55*b077aed3SPierre ProncheryLicensed under the Apache License 2.0 (the "License").  You may not use
56*b077aed3SPierre Proncherythis file except in compliance with the License.  You can obtain a copy
57*b077aed3SPierre Proncheryin the file LICENSE in the source distribution or at
58*b077aed3SPierre ProncheryL<https://www.openssl.org/source/license.html>.
59*b077aed3SPierre Pronchery
60*b077aed3SPierre Pronchery=cut
61