1e1051a39Sopenharmony_ci/* 2e1051a39Sopenharmony_ci * Copyright 2019-2020 The OpenSSL Project Authors. All Rights Reserved. 3e1051a39Sopenharmony_ci * 4e1051a39Sopenharmony_ci * Licensed under the Apache License 2.0 (the "License"). You may not use 5e1051a39Sopenharmony_ci * this file except in compliance with the License. You can obtain a copy 6e1051a39Sopenharmony_ci * in the file LICENSE in the source distribution or at 7e1051a39Sopenharmony_ci * https://www.openssl.org/source/license.html 8e1051a39Sopenharmony_ci */ 9e1051a39Sopenharmony_ci 10e1051a39Sopenharmony_ci#include <openssl/core_dispatch.h> 11e1051a39Sopenharmony_ci#include <openssl/types.h> 12e1051a39Sopenharmony_ci#include <openssl/self_test.h> 13e1051a39Sopenharmony_ci 14e1051a39Sopenharmony_citypedef struct self_test_post_params_st { 15e1051a39Sopenharmony_ci /* FIPS module integrity check parameters */ 16e1051a39Sopenharmony_ci const char *module_filename; /* Module file to perform MAC on */ 17e1051a39Sopenharmony_ci const char *module_checksum_data; /* Expected module MAC integrity */ 18e1051a39Sopenharmony_ci 19e1051a39Sopenharmony_ci /* Used for KAT install indicator integrity check */ 20e1051a39Sopenharmony_ci const char *indicator_version; /* version - for future proofing */ 21e1051a39Sopenharmony_ci const char *indicator_data; /* data to perform MAC on */ 22e1051a39Sopenharmony_ci const char *indicator_checksum_data; /* Expected MAC integrity value */ 23e1051a39Sopenharmony_ci 24e1051a39Sopenharmony_ci /* Used for continuous tests */ 25e1051a39Sopenharmony_ci const char *conditional_error_check; 26e1051a39Sopenharmony_ci 27e1051a39Sopenharmony_ci /* BIO callbacks supplied to the FIPS provider */ 28e1051a39Sopenharmony_ci OSSL_FUNC_BIO_new_file_fn *bio_new_file_cb; 29e1051a39Sopenharmony_ci OSSL_FUNC_BIO_new_membuf_fn *bio_new_buffer_cb; 30e1051a39Sopenharmony_ci OSSL_FUNC_BIO_read_ex_fn *bio_read_ex_cb; 31e1051a39Sopenharmony_ci OSSL_FUNC_BIO_free_fn *bio_free_cb; 32e1051a39Sopenharmony_ci OSSL_CALLBACK *cb; 33e1051a39Sopenharmony_ci void *cb_arg; 34e1051a39Sopenharmony_ci OSSL_LIB_CTX *libctx; 35e1051a39Sopenharmony_ci 36e1051a39Sopenharmony_ci} SELF_TEST_POST_PARAMS; 37e1051a39Sopenharmony_ci 38e1051a39Sopenharmony_ciint SELF_TEST_post(SELF_TEST_POST_PARAMS *st, int on_demand_test); 39e1051a39Sopenharmony_ciint SELF_TEST_kats(OSSL_SELF_TEST *event, OSSL_LIB_CTX *libctx); 40e1051a39Sopenharmony_ci 41e1051a39Sopenharmony_civoid SELF_TEST_disable_conditional_error_state(void); 42