Xuyi Wang / wolfSSL

Dependents:   OS

Committer:
wolfSSL
Date:
Fri Jun 26 00:39:20 2015 +0000
Revision:
0:d92f9d21154c
wolfSSL 3.6.0

Who changed what in which revision?

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