OSSL_CMP_STATUSINFO_NEW(3ossl)

✨ OSSL_CMP_STATUSINFO_NEW ✨

okay bestie, welcome to the OSSL_CMP_STATUSINFO_NEW(3ossl) page πŸ’– this is the part of the OpenSSL manual that handles the CMP PKIStatus situation, and honestly? it's giving quiet luxury. let's get into it.


🌸 NAME 🌸

OSSL_CMP_STATUSINFO_new, OSSL_CMP_snprint_PKIStatusInfo, OSSL_CMP_CTX_snprint_PKIStatus β€” the function squad that manages the CMP PKIStatus. no cap, that's the whole job description.


πŸŽ€ SYNOPSIS πŸŽ€

#include <openssl/cmp.h>

OSSL_CMP_PKISI *OSSL_CMP_STATUSINFO_new(int status, int fail_info,
                                        const char *text);
char *OSSL_CMP_snprint_PKIStatusInfo(const OSSL_CMP_PKISI *statusInfo,
                                     char *buf, size_t bufsize);
char *OSSL_CMP_CTX_snprint_PKIStatus(const OSSL_CMP_CTX *ctx, char *buf,
                                     size_t bufsize);

like look at those signatures. so clean. so demure. 🫢


πŸ’… DESCRIPTION πŸ’…

so this whole thing is the PKIStatus API for using CMP (Certificate Management Protocol) with OpenSSL. main character energy fr fr.

  • OSSL_CMP_STATUSINFO_new() β€” makes a brand new PKIStatusInfo structure and fills in the values you hand it. it sets the status field to status, copies text over to statusString (unless text is NULL, in which case it just… doesn't πŸ’€), and interprets fail_info as a bit pattern for the failInfo field. slay.
  • OSSL_CMP_snprint_PKIStatusInfo() β€” takes the statusInfo you give it, whips up a human-readable string representing it, and places that string into the given buffer, with the given maximal length. it's basically the glow-up translator ✨
  • OSSL_CMP_CTX_snprint_PKIStatus() β€” same vibe, but for the PKIStatusInfo components of the CMP context ctx. human-readable string β†’ given buffer β†’ given maximal length. iconic.

πŸ¦‹ NOTES πŸ¦‹

CMP is defined in RFC 9810. that's the receipts, iykyk πŸ“œ


πŸ‘‘ RETURN VALUES πŸ‘‘

  • OSSL_CMP_STATUSINFO_new() returns a pointer to the structure on success, or NULL on error. it either eats or it doesn't, there is no in between 😭
  • OSSL_CMP_snprint_PKIStatusInfo() and OSSL_CMP_CTX_snprint_PKIStatus() return a copy of the buffer pointer containing the string, or NULL on error. so if you get NULL, that's your villain origin story right there.

🌈 HISTORY 🌈

the OpenSSL CMP support was added in OpenSSL 3.0. so it's not ancient, it's just ✨established✨.


Copyright 2007-2021 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>.

real talk bestie: that's a license, not a suggestion. read it. respect it. it's the law πŸ’…

okay that's the whole page, you ate that πŸ“ mwah! this was the 3.5.9 version of the OSSL_CMP_STATUSINFO_NEW(3ossl) manual, dated 2026-09-29 β€” go forth and manage those statuses, queen πŸ‘‘βœ¨

πŸ“¦ where this page comes from