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 "apps/cmp_mock_srv.h"
20 OSSL_CMP_SRV_CTX *ossl_cmp_mock_srv_new(OSSL_LIB_CTX *libctx, const char *propq);
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
37 associated with the library context I<libctx> and property query string
38 I<propq>, both of which may be NULL to select the defaults.
40 ossl_cmp_mock_srv_free() deallocates the contexts for the CMP mock server.
42 OSSL_CMP_SRV_CTX_set1_certOut() sets the certificate to be returned in
45 OSSL_CMP_SRV_CTX_set1_chainOut() sets the certificate chain to be added to
46 the extraCerts in a cp/ip/kup.
47 It should to useful to validate B<certOut>.
49 OSSL_CMP_SRV_CTX_set1_caPubsOut() sets the caPubs to be returned in an ip.
51 OSSL_CMP_SRV_CTX_set_statusInfo() sets the status info to be returned.
53 OSSL_CMP_SRV_CTX_set_send_error() enables enforcement of error responses.
55 OSSL_CMP_SRV_CTX_set_pollCount() sets the number of polls before cert response.
57 OSSL_CMP_SRV_CTX_set_checkAfterTime() sets the number of seconds
58 the client should wait for the next poll.
63 CMP is defined in RFC 4210 (and CRMF in RFC 4211).
67 ossl_cmp_mock_srv() returns a B<OSSL_CMP_SRV_CTX> structure on success,
70 ossl_cmp_mock_srv_free() does not return a value.
72 All other functions return 1 on success, 0 on error.
76 The OpenSSL CMP support was added in OpenSSL 3.0.
80 Copyright 2007-2020 The OpenSSL Project Authors. All Rights Reserved.
82 Licensed under the Apache License 2.0 (the "License"). You may not use
83 this file except in compliance with the License. You can obtain a copy
84 in the file LICENSE in the source distribution or at
85 L<https://www.openssl.org/source/license.html>.