]> git.ipfire.org Git - thirdparty/openssl.git/blame - doc/internal/man3/ossl_cmp_mock_srv_new.pod
Chunk 8 of CMP contribution to OpenSSL: CMP server and cmp_mock_srv.c for testing
[thirdparty/openssl.git] / doc / internal / man3 / ossl_cmp_mock_srv_new.pod
CommitLineData
62dcd2aa
DDO
1=pod
2
3=head1 NAME
4
5ossl_cmp_mock_srv_new,
6ossl_cmp_mock_srv_free,
7ossl_cmp_mock_srv_set1_certOut,
8ossl_cmp_mock_srv_set1_chainOut,
9ossl_cmp_mock_srv_set1_caPubsOut,
10ossl_cmp_mock_srv_set_statusInfo,
11ossl_cmp_mock_srv_set_send_error,
12ossl_cmp_mock_srv_set_pollCount,
13ossl_cmp_mock_srv_set_checkAfterTime
14- functions used for testing with CMP mock server
15
16=head1 SYNOPSIS
17
18 #include <openssl/cmp.h>
19
20 OSSL_CMP_SRV_CTX *ossl_cmp_mock_srv_new(void);
21 void ossl_cmp_mock_srv_free(OSSL_CMP_SRV_CTX *srv_ctx);
22
23 int ossl_cmp_mock_srv_set1_certOut(OSSL_CMP_SRV_CTX *srv_ctx, X509 *cert);
24 int ossl_cmp_mock_srv_set1_chainOut(OSSL_CMP_SRV_CTX *srv_ctx,
25 STACK_OF(X509) *chain);
26 int ossl_cmp_mock_srv_set1_caPubsOut(OSSL_CMP_SRV_CTX *srv_ctx,
27 STACK_OF(X509) *caPubs);
28 int ossl_cmp_mock_srv_set_statusInfo(OSSL_CMP_SRV_CTX *srv_ctx, int status,
29 int fail_info, const char *text);
30 int ossl_cmp_mock_srv_set_send_error(OSSL_CMP_SRV_CTX *srv_ctx, int val);
31 int ossl_cmp_mock_srv_set_pollCount(OSSL_CMP_SRV_CTX *srv_ctx, int count);
32 int ossl_cmp_mock_srv_set_checkAfterTime(OSSL_CMP_SRV_CTX *srv_ctx, int sec);
33
34=head1 DESCRIPTION
35
36ossl_cmp_mock_srv_new() allocates the contexts for the CMP mock server.
37
38ossl_cmp_mock_srv_free() deallocates the contexts for the CMP mock server.
39
40OSSL_CMP_SRV_CTX_set1_certOut() sets the certificate to be returned in
41cp/ip/kup.
42
43OSSL_CMP_SRV_CTX_set1_chainOut() sets the certificate chain to be added to
44the extraCerts in a cp/ip/kup.
45It should to useful to validate B<certOut>.
46
47OSSL_CMP_SRV_CTX_set1_caPubsOut() sets the caPubs to be returned in an ip.
48
49OSSL_CMP_SRV_CTX_set_statusInfo() sets the status info to be returned.
50
51OSSL_CMP_SRV_CTX_set_send_error() enables enforcement of error responses.
52
53OSSL_CMP_SRV_CTX_set_pollCount() sets the number of polls before cert response.
54
55OSSL_CMP_SRV_CTX_set_checkAfterTime() sets the number of seconds
56the client should wait for the next poll.
57
58
59=head1 NOTES
60
61CMP is defined in RFC 4210 (and CRMF in RFC 4211).
62
63=head1 RETURN VALUES
64
65ossl_cmp_mock_srv() returns a B<OSSL_CMP_SRV_CTX> structure on success,
66NULL on error.
67
68ossl_cmp_mock_srv_free() does not return a value.
69
70All other functions return 1 on success, 0 on error.
71
72=head1 HISTORY
73
74The OpenSSL CMP support was added in OpenSSL 3.0.
75
76=head1 COPYRIGHT
77
78Copyright 2007-2020 The OpenSSL Project Authors. All Rights Reserved.
79
80Licensed under the Apache License 2.0 (the "License"). You may not use
81this file except in compliance with the License. You can obtain a copy
82in the file LICENSE in the source distribution or at
83L<https://www.openssl.org/source/license.html>.
84
85=cut