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
18 #include <openssl/cmp.h>
20 OSSL_CMP_SRV_CTX *ossl_cmp_mock_srv_new(void);
21 void ossl_cmp_mock_srv_free(OSSL_CMP_SRV_CTX *srv_ctx);
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);
36 ossl_cmp_mock_srv_new() allocates the contexts for the CMP mock server.
38 ossl_cmp_mock_srv_free() deallocates the contexts for the CMP mock server.
40 OSSL_CMP_SRV_CTX_set1_certOut() sets the certificate to be returned in
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>.
47 OSSL_CMP_SRV_CTX_set1_caPubsOut() sets the caPubs to be returned in an ip.
49 OSSL_CMP_SRV_CTX_set_statusInfo() sets the status info to be returned.
51 OSSL_CMP_SRV_CTX_set_send_error() enables enforcement of error responses.
53 OSSL_CMP_SRV_CTX_set_pollCount() sets the number of polls before cert response.
55 OSSL_CMP_SRV_CTX_set_checkAfterTime() sets the number of seconds
56 the client should wait for the next poll.
61 CMP is defined in RFC 4210 (and CRMF in RFC 4211).
65 ossl_cmp_mock_srv() returns a B<OSSL_CMP_SRV_CTX> structure on success,
68 ossl_cmp_mock_srv_free() does not return a value.
70 All other functions return 1 on success, 0 on error.
74 The OpenSSL CMP support was added in OpenSSL 3.0.
78 Copyright 2007-2020 The OpenSSL Project Authors. All Rights Reserved.
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>.