xref: /netbsd-src/crypto/external/bsd/openssl/dist/apps/include/cmp_mock_srv.h (revision 4170684f22077e3779c5c14826430de0dec964b2)
1b0d17251Schristos /*
2*4170684fSchristos  * Copyright 2018-2023 The OpenSSL Project Authors. All Rights Reserved.
3b0d17251Schristos  * Copyright Siemens AG 2018-2020
4b0d17251Schristos  *
5b0d17251Schristos  * Licensed under the Apache License 2.0 (the "License").  You may not use
6b0d17251Schristos  * this file except in compliance with the License.  You can obtain a copy
7b0d17251Schristos  * in the file LICENSE in the source distribution or at
8b0d17251Schristos  * https://www.openssl.org/source/license.html
9b0d17251Schristos  */
10b0d17251Schristos 
11b0d17251Schristos #ifndef OSSL_APPS_CMP_MOCK_SRV_H
12b0d17251Schristos # define OSSL_APPS_CMP_MOCK_SRV_H
13b0d17251Schristos 
14b0d17251Schristos # include <openssl/opensslconf.h>
15b0d17251Schristos # ifndef OPENSSL_NO_CMP
16b0d17251Schristos 
17b0d17251Schristos #  include <openssl/cmp.h>
18b0d17251Schristos 
19b0d17251Schristos OSSL_CMP_SRV_CTX *ossl_cmp_mock_srv_new(OSSL_LIB_CTX *libctx,
20b0d17251Schristos                                         const char *propq);
21b0d17251Schristos void ossl_cmp_mock_srv_free(OSSL_CMP_SRV_CTX *srv_ctx);
22b0d17251Schristos 
23b0d17251Schristos int ossl_cmp_mock_srv_set1_certOut(OSSL_CMP_SRV_CTX *srv_ctx, X509 *cert);
24b0d17251Schristos int ossl_cmp_mock_srv_set1_chainOut(OSSL_CMP_SRV_CTX *srv_ctx,
25b0d17251Schristos                                     STACK_OF(X509) *chain);
26b0d17251Schristos int ossl_cmp_mock_srv_set1_caPubsOut(OSSL_CMP_SRV_CTX *srv_ctx,
27b0d17251Schristos                                      STACK_OF(X509) *caPubs);
28b0d17251Schristos int ossl_cmp_mock_srv_set_statusInfo(OSSL_CMP_SRV_CTX *srv_ctx, int status,
29b0d17251Schristos                                      int fail_info, const char *text);
30*4170684fSchristos int ossl_cmp_mock_srv_set_sendError(OSSL_CMP_SRV_CTX *srv_ctx, int bodytype);
31b0d17251Schristos int ossl_cmp_mock_srv_set_pollCount(OSSL_CMP_SRV_CTX *srv_ctx, int count);
32b0d17251Schristos int ossl_cmp_mock_srv_set_checkAfterTime(OSSL_CMP_SRV_CTX *srv_ctx, int sec);
33b0d17251Schristos 
34b0d17251Schristos # endif /* !defined(OPENSSL_NO_CMP) */
35b0d17251Schristos #endif /* !defined(OSSL_APPS_CMP_MOCK_SRV_H) */
36