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