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