1 /* settings_comp.h
2  *
3  * Copyright (C) 2006-2021 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 #ifndef CTAO_CRYPT_SETTINGS_C_H
24 #define CTAO_CRYPT_SETTINGS_C_H
25 
26 
27 /* since fips overrides rsa.h map compatibility here */
28 #if !defined(NO_RSA)
29 	#ifdef WOLFSSL_KEY_GEN
30 	    #define RsaKeyToDer wc_RsaKeyToDer
31 	#endif
32 
33 	#define RsaPrivateKeyDecode   wc_RsaPrivateKeyDecode
34 	#define RsaPublicKeyDecode    wc_RsaPublicKeyDecode
35 	#define RsaPublicKeyDecodeRaw wc_RsaPublicKeyDecodeRaw
36 #endif /* have rsa and HAVE_FIPS */
37 
38 /* Macro redefinitions for compatibility */
39 #if defined(WOLFSSL_SHA512) && !defined(CYASSL_SHA512)
40     #define CYASSL_SHA512
41 #endif
42 #if defined(WOLFSSL_SHA384) && !defined(CYASSL_SHA384)
43     #define CYASSL_SHA384
44 #endif
45 #if defined(WOLFSSL_LEANPSK) && !defined(CYASSL_LEANPSK)
46     #define CYASSL_LEANPSK
47 #endif
48 #if defined(NO_WOLFSSL_MEMORY) && !defined(NO_CYASSL_MEMORY)
49     #define NO_CYASSL_MEMORY
50 #endif
51 #if defined(WOLFSSL_KEY_GEN) && !defined(CYASSL_KEY_GEN)
52     #define CYASSL_KEY_GEN
53 #endif
54 
55 /* AES */
56 #if defined(WOLFSSL_AES_DIRECT) && !defined(CYASSL_AES_DIRECT)
57     #define CYASSL_AES_DIRECT
58 #endif
59 #if defined(WOLFSSL_AES_COUNTER) && !defined(CYASSL_AES_COUNTER)
60     #define CYASSL_AES_COUNTER
61 #endif
62 
63 /* DES */
64 #if defined(WOLFSSL_DES_ECB) && !defined(CYASSL_DES_ECB)
65     #define CYASSL_DES_ECB
66 #endif
67 
68 #endif /* CTAO_CRYPT_SETTINGS_C_H */
69 
70