| 1 |
.\" -*- mode: troff; coding: utf-8 -*- |
| 2 |
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45) |
| 3 |
.\" |
| 4 |
.\" Standard preamble: |
| 5 |
.\" ======================================================================== |
| 6 |
.de Sp \" Vertical space (when we can't use .PP) |
| 7 |
.if t .sp .5v |
| 8 |
.if n .sp |
| 9 |
.. |
| 10 |
.de Vb \" Begin verbatim text |
| 11 |
.ft CW |
| 12 |
.nf |
| 13 |
.ne \\$1 |
| 14 |
.. |
| 15 |
.de Ve \" End verbatim text |
| 16 |
.ft R |
| 17 |
.fi |
| 18 |
.. |
| 19 |
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. |
| 20 |
.ie n \{\ |
| 21 |
. ds C` "" |
| 22 |
. ds C' "" |
| 23 |
'br\} |
| 24 |
.el\{\ |
| 25 |
. ds C` |
| 26 |
. ds C' |
| 27 |
'br\} |
| 28 |
.\" |
| 29 |
.\" Escape single quotes in literal strings from groff's Unicode transform. |
| 30 |
.ie \n(.g .ds Aq \(aq |
| 31 |
.el .ds Aq ' |
| 32 |
.\" |
| 33 |
.\" If the F register is >0, we'll generate index entries on stderr for |
| 34 |
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index |
| 35 |
.\" entries marked with X<> in POD. Of course, you'll have to process the |
| 36 |
.\" output yourself in some meaningful fashion. |
| 37 |
.\" |
| 38 |
.\" Avoid warning from groff about undefined register 'F'. |
| 39 |
.de IX |
| 40 |
.. |
| 41 |
.nr rF 0 |
| 42 |
.if \n(.g .if rF .nr rF 1 |
| 43 |
.if (\n(rF:(\n(.g==0)) \{\ |
| 44 |
. if \nF \{\ |
| 45 |
. de IX |
| 46 |
. tm Index:\\$1\t\\n%\t"\\$2" |
| 47 |
.. |
| 48 |
. if !\nF==2 \{\ |
| 49 |
. nr % 0 |
| 50 |
. nr F 2 |
| 51 |
. \} |
| 52 |
. \} |
| 53 |
.\} |
| 54 |
.rr rF |
| 55 |
.\" ======================================================================== |
| 56 |
.\" |
| 57 |
.IX Title "OSSL_CMP_MSG_HTTP_PERFORM 3SSL" |
| 58 |
.TH OSSL_CMP_MSG_HTTP_PERFORM 3SSL 2026-04-07 3.6.2 OpenSSL |
| 59 |
.\" For nroff, turn off justification. Always turn off hyphenation; it makes |
| 60 |
.\" way too many mistakes in technical documents. |
| 61 |
.if n .ad l |
| 62 |
.nh |
| 63 |
.SH NAME |
| 64 |
OSSL_CMP_MSG_http_perform |
| 65 |
\&\- client\-side HTTP(S) transfer of a CMP request\-response pair |
| 66 |
.SH SYNOPSIS |
| 67 |
.IX Header "SYNOPSIS" |
| 68 |
.Vb 1 |
| 69 |
\& #include <openssl/cmp.h> |
| 70 |
\& |
| 71 |
\& OSSL_CMP_MSG *OSSL_CMP_MSG_http_perform(OSSL_CMP_CTX *ctx, |
| 72 |
\& const OSSL_CMP_MSG *req); |
| 73 |
.Ve |
| 74 |
.SH DESCRIPTION |
| 75 |
.IX Header "DESCRIPTION" |
| 76 |
\&\fBOSSL_CMP_MSG_http_perform()\fR sends the given PKIMessage \fIreq\fR to the |
| 77 |
CMP server specified in \fIctx\fR and returns the result obtained from it. |
| 78 |
.PP |
| 79 |
If \fBOSSL_CMP_CTX_set_transfer_cb_arg\fR\|(3) has been used to set the transfer |
| 80 |
callback argument then the provided pointer \fIbios\fR is taken as |
| 81 |
a two-element \fBBIO\fR array to use for the exchange with the server |
| 82 |
as described for the \fIbio\fR and \fIrbio\fR parameters of \fBOSSL_HTTP_open\fR\|(3). |
| 83 |
For instance, the two BIO pointers may be equal and refer to a TLS connection, |
| 84 |
such as in BRSKI-AE where a pre-established TLS channel is reused for CMP. |
| 85 |
.PP |
| 86 |
Otherwise the server specified via \fBOSSL_CMP_CTX_set1_server\fR\|(3) |
| 87 |
and optionally \fBOSSL_CMP_CTX_set_serverPort\fR\|(3) is contacted, |
| 88 |
where the default port is 80 for HTTP and 443 for HTTPS. |
| 89 |
The HTTP path (aka "CMP alias" in this context) to use is by default \f(CW\*(C`/\*(C'\fR, |
| 90 |
otherwise the string specified via \fBOSSL_CMP_CTX_set1_serverPath\fR\|(3). |
| 91 |
On success the function returns the server's response PKIMessage. |
| 92 |
.PP |
| 93 |
The function makes use of any HTTP callback function |
| 94 |
set via \fBOSSL_CMP_CTX_set_http_cb\fR\|(3). |
| 95 |
It respects any timeout value set via \fBOSSL_CMP_CTX_set_option\fR\|(3) |
| 96 |
with an \fBOSSL_CMP_OPT_MSG_TIMEOUT\fR argument. |
| 97 |
It also respects any HTTP(S) proxy options set via \fBOSSL_CMP_CTX_set1_proxy\fR\|(3) |
| 98 |
and \fBOSSL_CMP_CTX_set1_no_proxy\fR\|(3) and the respective environment variables. |
| 99 |
Proxying plain HTTP is supported directly, |
| 100 |
while using a proxy for HTTPS connections requires a suitable callback function |
| 101 |
such as \fBOSSL_HTTP_proxy_connect\fR\|(3). |
| 102 |
.SH NOTES |
| 103 |
.IX Header "NOTES" |
| 104 |
CMP is defined in RFC 9810. |
| 105 |
HTTP transfer for CMP is defined in RFC 9811. |
| 106 |
.SH "RETURN VALUES" |
| 107 |
.IX Header "RETURN VALUES" |
| 108 |
\&\fBOSSL_CMP_MSG_http_perform()\fR |
| 109 |
returns the received CMP response message on success, else NULL. |
| 110 |
.SH "SEE ALSO" |
| 111 |
.IX Header "SEE ALSO" |
| 112 |
\&\fBOSSL_CMP_CTX_new\fR\|(3), \fBOSSL_HTTP_open\fR\|(3), and \fBOSSL_HTTP_proxy_connect\fR\|(3). |
| 113 |
.SH HISTORY |
| 114 |
.IX Header "HISTORY" |
| 115 |
The OpenSSL CMP support was added in OpenSSL 3.0. |
| 116 |
.PP |
| 117 |
The \fBOSSL_CMP_MSG_http_perform()\fR use of transfer_cb_arg was added in OpenSSL 3.5. |
| 118 |
.SH COPYRIGHT |
| 119 |
.IX Header "COPYRIGHT" |
| 120 |
Copyright 2007\-2025 The OpenSSL Project Authors. All Rights Reserved. |
| 121 |
.PP |
| 122 |
Licensed under the Apache License 2.0 (the "License"). You may not use |
| 123 |
this file except in compliance with the License. You can obtain a copy |
| 124 |
in the file LICENSE in the source distribution or at |
| 125 |
<https://www.openssl.org/source/license.html>. |