OSSL_CMP_MSG_HTTP_PERFORM(3SSL)

πŸ’– OSSL_CMP_MSG_HTTP_PERFORM πŸ’–

okay bestie, welcome to the OpenSSL manual, section 3SSL β€” this one's literally called OSSL_CMP_MSG_http_perform, and it's the lil glow-up that carries your CMP request-response pair over HTTP(S) like it's walking the runway. πŸ¦‹


✨ NAME ✨

OSSL_CMP_MSG_http_perform β€” client-side HTTP(S) transfer of a CMP request-response pair. no cap, that's the whole vibe. πŸ’…


🌸 SYNOPSIS 🌸

#include <openssl/cmp.h>

OSSL_CMP_MSG *OSSL_CMP_MSG_http_perform(OSSL_CMP_CTX *ctx,
                                        const OSSL_CMP_MSG *req);

πŸŽ€ DESCRIPTION πŸŽ€

OSSL_CMP_MSG_http_perform() takes the PKIMessage req you hand it, yeets it over to the CMP server that's specified in ctx, and hands you back whatever result it got. simple as that, fr fr. ✨

Now here's the tea on how it gets there, because there's two whole routes:

If you already set the transfer callback argument with OSSL_CMP_CTX_set_transfer_cb_arg(3), then the pointer bios you gave it gets treated as a two-element BIO array β€” you use it for the exchange with the server, exactly as described for the bio and rbio parameters of OSSL_HTTP_open(3). and like, plot twist, those two BIO pointers can totally be the same pointer, both referring to a TLS connection! that's the move in BRSKI-AE, where a pre-established TLS channel gets reused for CMP. iconic behavior honestly. πŸ‘‘

Otherwise β€” plan B, the classic route β€” the server you set via OSSL_CMP_CTX_set1_server(3), plus optionally OSSL_CMP_CTX_set_serverPort(3), gets contacted. heads up on the defaults bestie:

  • the default port is 80 for HTTP
  • and 443 for HTTPS

The HTTP path (aka the "CMP alias" in this context, cute name, love that for her) is "/" by default β€” unless you specified a string via OSSL_CMP_CTX_set1_serverPath(3), in which case that's what gets used. and on success? the function returns the server's response PKIMessage. slay. πŸ’–

Also, this function is a whole overachiever, she:

⚠️ important caveat, don't skip this one: proxying plain HTTP is supported directly, but using a proxy for HTTPS connections requires a suitable callback function, such as OSSL_HTTP_proxy_connect(3). so don't come crying to me when your HTTPS proxy does nothing without one. 😭

πŸ“œ NOTES πŸ“œ

CMP is defined in RFC 9810. HTTP transfer for CMP is defined in RFC 9811. go read them if you want the lore, iykyk. πŸ“š


πŸ¦‹ RETURN VALUES πŸ¦‹

OSSL_CMP_MSG_http_perform() returns the received CMP response message on success, else NULL. that's it. success = response message, anything else = NULL. periodt. πŸ’€


πŸ”₯ SEE ALSO πŸ”₯


🌈 HISTORY 🌈

The OpenSSL CMP support was added in OpenSSL 3.0. ✨

The OSSL_CMP_MSG_http_perform() use of transfer_cb_arg was added in OpenSSL 3.5. glow-up era. πŸ’…


Copyright 2007-2025 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.


and that's the whole page bestie!! mwah πŸ’– this was OpenSSL 4.0.3, dated 2026-09-29 β€” tysm for reading, go forth and transfer your CMP messages responsibly πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from