My Project
Loading...
Searching...
No Matches
fips_test.h
1/* fips_test.h
2 *
3 * Copyright (C) 2006-2020 wolfSSL Inc.
4 *
5 * This file is part of wolfSSL.
6 *
7 * wolfSSL is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * wolfSSL is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
20 */
21
22
23
24#ifndef CTAO_CRYPT_FIPS_TEST_H
25#define CTAO_CRYPT_FIPS_TEST_H
26
27#include <cyassl/ctaocrypt/types.h>
28
29
30#ifdef __cplusplus
31 extern "C" {
32#endif
33
34/* Known Answer Test string inputs are hex, internal */
35CYASSL_LOCAL int DoKnownAnswerTests(char*, int);
36
37
38/* FIPS failure callback */
39typedef void(*wolfCrypt_fips_cb)(int ok, int err, const char* hash);
40
41/* Public set function */
42CYASSL_API int wolfCrypt_SetCb_fips(wolfCrypt_fips_cb cbf);
43
44/* Public get status functions */
45CYASSL_API int wolfCrypt_GetStatus_fips(void);
46CYASSL_API const char* wolfCrypt_GetCoreHash_fips(void);
47
48#ifdef HAVE_FORCE_FIPS_FAILURE
49 /* Public function to force failure mode for operational testing */
50 CYASSL_API int wolfCrypt_SetStatus_fips(int);
51#endif
52
53
54#ifdef __cplusplus
55 } /* extern "C" */
56#endif
57
58#endif /* CTAO_CRYPT_FIPS_TEST_H */
59