1*b077aed3SPierre Pronchery=pod 2*b077aed3SPierre Pronchery 3*b077aed3SPierre Pronchery=head1 NAME 4*b077aed3SPierre Pronchery 5*b077aed3SPierre ProncheryOSSL_CMP_STATUSINFO_new, 6*b077aed3SPierre ProncheryOSSL_CMP_snprint_PKIStatusInfo, 7*b077aed3SPierre ProncheryOSSL_CMP_CTX_snprint_PKIStatus 8*b077aed3SPierre Pronchery- function(s) for managing the CMP PKIStatus 9*b077aed3SPierre Pronchery 10*b077aed3SPierre Pronchery=head1 SYNOPSIS 11*b077aed3SPierre Pronchery 12*b077aed3SPierre Pronchery #include <openssl/cmp.h> 13*b077aed3SPierre Pronchery 14*b077aed3SPierre Pronchery OSSL_CMP_PKISI *OSSL_CMP_STATUSINFO_new(int status, int fail_info, 15*b077aed3SPierre Pronchery const char *text); 16*b077aed3SPierre Pronchery char *OSSL_CMP_snprint_PKIStatusInfo(const OSSL_CMP_PKISI *statusInfo, 17*b077aed3SPierre Pronchery char *buf, size_t bufsize); 18*b077aed3SPierre Pronchery char *OSSL_CMP_CTX_snprint_PKIStatus(const OSSL_CMP_CTX *ctx, char *buf, 19*b077aed3SPierre Pronchery size_t bufsize); 20*b077aed3SPierre Pronchery 21*b077aed3SPierre Pronchery=head1 DESCRIPTION 22*b077aed3SPierre Pronchery 23*b077aed3SPierre ProncheryThis is the PKIStatus API for using CMP (Certificate Management Protocol) with 24*b077aed3SPierre ProncheryOpenSSL. 25*b077aed3SPierre Pronchery 26*b077aed3SPierre ProncheryOSSL_CMP_STATUSINFO_new() creates a new PKIStatusInfo structure 27*b077aed3SPierre Proncheryand fills in the given values. 28*b077aed3SPierre ProncheryIt sets the status field to I<status>, 29*b077aed3SPierre Proncherycopies I<text> (unless it is NULL) to statusString, 30*b077aed3SPierre Proncheryand interprets I<fail_info> as bit pattern for the failInfo field. 31*b077aed3SPierre Pronchery 32*b077aed3SPierre ProncheryOSSL_CMP_snprint_PKIStatusInfo() places a human-readable string 33*b077aed3SPierre Proncheryrepresenting the given statusInfo 34*b077aed3SPierre Proncheryin the given buffer, with the given maximal length. 35*b077aed3SPierre Pronchery 36*b077aed3SPierre ProncheryOSSL_CMP_CTX_snprint_PKIStatus() places a human-readable string 37*b077aed3SPierre Proncheryrepresenting the PKIStatusInfo components of the CMP context I<ctx> 38*b077aed3SPierre Proncheryin the given buffer, with the given maximal length. 39*b077aed3SPierre Pronchery 40*b077aed3SPierre Pronchery=head1 NOTES 41*b077aed3SPierre Pronchery 42*b077aed3SPierre ProncheryCMP is defined in RFC 4210 (and CRMF in RFC 4211). 43*b077aed3SPierre Pronchery 44*b077aed3SPierre Pronchery=head1 RETURN VALUES 45*b077aed3SPierre Pronchery 46*b077aed3SPierre ProncheryOSSL_CMP_STATUSINFO_new() 47*b077aed3SPierre Proncheryreturns a pointer to the structure on success, or NULL on error. 48*b077aed3SPierre Pronchery 49*b077aed3SPierre ProncheryOSSL_CMP_snprint_PKIStatusInfo() and 50*b077aed3SPierre ProncheryOSSL_CMP_CTX_snprint_PKIStatus() 51*b077aed3SPierre Proncheryreturn a copy of the buffer pointer containing the string or NULL on error. 52*b077aed3SPierre Pronchery 53*b077aed3SPierre Pronchery=head1 HISTORY 54*b077aed3SPierre Pronchery 55*b077aed3SPierre ProncheryThe OpenSSL CMP support was added in OpenSSL 3.0. 56*b077aed3SPierre Pronchery 57*b077aed3SPierre Pronchery=head1 COPYRIGHT 58*b077aed3SPierre Pronchery 59*b077aed3SPierre ProncheryCopyright 2007-2021 The OpenSSL Project Authors. All Rights Reserved. 60*b077aed3SPierre Pronchery 61*b077aed3SPierre ProncheryLicensed under the Apache License 2.0 (the "License"). You may not use 62*b077aed3SPierre Proncherythis file except in compliance with the License. You can obtain a copy 63*b077aed3SPierre Proncheryin the file LICENSE in the source distribution or at 64*b077aed3SPierre ProncheryL<https://www.openssl.org/source/license.html>. 65*b077aed3SPierre Pronchery 66*b077aed3SPierre Pronchery=cut 67