]>
Commit | Line | Data |
---|---|---|
62dcd2aa DDO |
1 | =pod |
2 | ||
3 | =head1 NAME | |
4 | ||
5 | ossl_cmp_mock_srv_new, | |
6 | ossl_cmp_mock_srv_free, | |
7 | ossl_cmp_mock_srv_set1_certOut, | |
8 | ossl_cmp_mock_srv_set1_chainOut, | |
9 | ossl_cmp_mock_srv_set1_caPubsOut, | |
10 | ossl_cmp_mock_srv_set_statusInfo, | |
11 | ossl_cmp_mock_srv_set_send_error, | |
12 | ossl_cmp_mock_srv_set_pollCount, | |
13 | ossl_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 | ||
36 | ossl_cmp_mock_srv_new() allocates the contexts for the CMP mock server. | |
37 | ||
38 | ossl_cmp_mock_srv_free() deallocates the contexts for the CMP mock server. | |
39 | ||
40 | OSSL_CMP_SRV_CTX_set1_certOut() sets the certificate to be returned in | |
41 | cp/ip/kup. | |
42 | ||
43 | OSSL_CMP_SRV_CTX_set1_chainOut() sets the certificate chain to be added to | |
44 | the extraCerts in a cp/ip/kup. | |
45 | It should to useful to validate B<certOut>. | |
46 | ||
47 | OSSL_CMP_SRV_CTX_set1_caPubsOut() sets the caPubs to be returned in an ip. | |
48 | ||
49 | OSSL_CMP_SRV_CTX_set_statusInfo() sets the status info to be returned. | |
50 | ||
51 | OSSL_CMP_SRV_CTX_set_send_error() enables enforcement of error responses. | |
52 | ||
53 | OSSL_CMP_SRV_CTX_set_pollCount() sets the number of polls before cert response. | |
54 | ||
55 | OSSL_CMP_SRV_CTX_set_checkAfterTime() sets the number of seconds | |
56 | the client should wait for the next poll. | |
57 | ||
58 | ||
59 | =head1 NOTES | |
60 | ||
61 | CMP is defined in RFC 4210 (and CRMF in RFC 4211). | |
62 | ||
63 | =head1 RETURN VALUES | |
64 | ||
65 | ossl_cmp_mock_srv() returns a B<OSSL_CMP_SRV_CTX> structure on success, | |
66 | NULL on error. | |
67 | ||
68 | ossl_cmp_mock_srv_free() does not return a value. | |
69 | ||
70 | All other functions return 1 on success, 0 on error. | |
71 | ||
72 | =head1 HISTORY | |
73 | ||
74 | The OpenSSL CMP support was added in OpenSSL 3.0. | |
75 | ||
76 | =head1 COPYRIGHT | |
77 | ||
78 | Copyright 2007-2020 The OpenSSL Project Authors. All Rights Reserved. | |
79 | ||
80 | Licensed under the Apache License 2.0 (the "License"). You may not use | |
81 | this file except in compliance with the License. You can obtain a copy | |
82 | in the file LICENSE in the source distribution or at | |
83 | L<https://www.openssl.org/source/license.html>. | |
84 | ||
85 | =cut |