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