xref: /freebsd/crypto/openssl/doc/internal/man3/ossl_cmp_ctx_set1_caPubs.pod (revision b077aed33b7b6aefca7b17ddb250cf521f938613)
1=pod
2
3=head1 NAME
4
5ossl_cmp_ctx_set1_caPubs,
6ossl_cmp_ctx_set0_validatedSrvCert,
7ossl_cmp_ctx_set_status,
8ossl_cmp_ctx_set0_statusString,
9ossl_cmp_ctx_set_failInfoCode,
10ossl_cmp_ctx_set0_newCert,
11ossl_cmp_ctx_set1_extraCertsIn,
12ossl_cmp_ctx_set1_recipNonce
13- internal functions for managing the CMP client context datastructure
14
15=head1 SYNOPSIS
16
17 #include <openssl/cmp.h>
18
19 int ossl_cmp_ctx_set1_caPubs(OSSL_CMP_CTX *ctx, STACK_OF(X509) *caPubs);
20 int ossl_cmp_ctx_set0_validatedSrvCert(OSSL_CMP_CTX *ctx, X509 *cert);
21 int ossl_cmp_ctx_set_status(OSSL_CMP_CTX *ctx, int status);
22 int ossl_cmp_ctx_set0_statusString(OSSL_CMP_CTX *ctx,
23                                    OSSL_CMP_PKIFREETEXT *text);
24 int ossl_cmp_ctx_set_failInfoCode(OSSL_CMP_CTX *ctx, int fail_info);
25 int ossl_cmp_ctx_set0_newCert(OSSL_CMP_CTX *ctx, X509 *cert);
26 int ossl_cmp_ctx_set1_extraCertsIn(OSSL_CMP_CTX *ctx,
27                                    STACK_OF(X509) *extraCertsIn);
28 int ossl_cmp_ctx_set1_recipNonce(OSSL_CMP_CTX *ctx,
29                                  const ASN1_OCTET_STRING *nonce);
30
31=head1 DESCRIPTION
32
33ossl_cmp_ctx_set1_caPubs() copies the given stack of CA certificates
34to the caPubs field of the context.
35The reference counts of those certificates handled successfully are increased.
36
37ossl_cmp_ctx_set0_validatedSrvCert() sets the validatedSrvCert of the context,
38which caches any already validated server cert, or NULL if not available.
39
40ossl_cmp_ctx_set_status() sets the status field of the context.
41
42ossl_cmp_ctx_set0_statusString() sets the statusString field of the context.
43
44ossl_cmp_ctx_set_failInfoCode() sets the error code bits in the failInfoCode
45field of the context based on the given OSSL_CMP_PKIFAILUREINFO structure.
46
47ossl_cmp_ctx_set0_newCert() sets the given (newly enrolled) certificate
48in the context.
49
50ossl_cmp_ctx_set1_extraCertsIn() sets the extraCertsIn field of the context.
51The reference counts of those certificates handled successfully are increased.
52
53ossl_cmp_ctx_set1_recipNonce() sets the given recipient nonce in the context.
54
55=head1 NOTES
56
57CMP is defined in RFC 4210 (and CRMF in RFC 4211).
58
59=head1 RETURN VALUES
60
61All functions return 1 on success, 0 on error.
62
63=head1 HISTORY
64
65The OpenSSL CMP support was added in OpenSSL 3.0.
66
67=head1 COPYRIGHT
68
69Copyright 2007-2018 The OpenSSL Project Authors. All Rights Reserved.
70
71Licensed under the Apache License 2.0 (the "License").  You may not use
72this file except in compliance with the License.  You can obtain a copy
73in the file LICENSE in the source distribution or at
74L<https://www.openssl.org/source/license.html>.
75
76=cut
77