MultiTech / CyaSSL

Dependents:   HTTPClient-SSL HTTPClient-SSL HTTPClient-SSL HTTPClient-SSL

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers fips_test.h Source File

fips_test.h

00001 /* fips_test.h
00002  *
00003  * Copyright (C) 2006-2014 wolfSSL Inc.
00004  *
00005  * This file is part of CyaSSL.
00006  *
00007  * CyaSSL is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU General Public License as published by
00009  * the Free Software Foundation; either version 2 of the License, or
00010  * (at your option) any later version.
00011  *
00012  * CyaSSL is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
00020  */
00021 
00022 
00023 #ifndef CTAO_CRYPT_FIPS_TEST_H
00024 #define CTAO_CRYPT_FIPS_TEST_H
00025 
00026 #include <cyassl/ctaocrypt/types.h>
00027 
00028 
00029 #ifdef __cplusplus
00030     extern "C" {
00031 #endif
00032 
00033 /* Known Answer Test string inputs are hex, internal */
00034 CYASSL_LOCAL int DoKnownAnswerTests(char*, int);
00035 
00036 
00037 /* FIPS failure callback */
00038 typedef void(*wolfCrypt_fips_cb)(int ok, int err, const char* hash);
00039 
00040 /* Public set function */
00041 CYASSL_API int wolfCrypt_SetCb_fips(wolfCrypt_fips_cb cbf);
00042 
00043 /* Public get status functions */
00044 CYASSL_API int wolfCrypt_GetStatus_fips(void);
00045 CYASSL_API const char* wolfCrypt_GetCoreHash_fips(void);
00046 
00047 #ifdef HAVE_FORCE_FIPS_FAILURE
00048     /* Public function to force failure mode for operational testing */
00049     CYASSL_API int wolfCrypt_SetStatus_fips(int);
00050 #endif
00051 
00052 
00053 #ifdef __cplusplus
00054     } /* extern "C" */
00055 #endif
00056 
00057 #endif /* CTAO_CRYPT_FIPS_TEST_H */
00058