1 /* 2 * This file is part of the openHiTLS project. 3 * 4 * openHiTLS is licensed under the Mulan PSL v2. 5 * You can use this software according to the terms and conditions of the Mulan PSL v2. 6 * You may obtain a copy of Mulan PSL v2 at: 7 * 8 * http://license.coscl.org.cn/MulanPSL2 9 * 10 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, 11 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, 12 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. 13 * See the Mulan PSL v2 for more details. 14 */ 15 /* Derivation of configuration features. 16 * The derivation type (rule) and sequence are as follows: 17 * 1. Parent features derive child features. 18 * 2. Derive the features of dependencies. 19 * For example, if feature a depends on features b and c, you need to derive features b and c. 20 * 3. Child features derive parent features. 21 * The high-level interfaces of the crypto module is controlled by the parent feature macro, 22 * if there is no parent feature, such interfaces will be unavailable. 23 */ 24 25 #ifndef HITLS_CONFIG_LAYER_BSL_H 26 #define HITLS_CONFIG_LAYER_BSL_H 27 28 /* BSL_INIT */ 29 #if defined(HITLS_CRYPTO_EAL) && !defined(HITLS_BSL_INIT) 30 #define HITLS_BSL_INIT 31 #endif 32 33 #if defined(HITLS_BSL_INIT) && !defined(HITLS_BSL_ERR) 34 #define HITLS_BSL_ERR 35 #endif 36 37 /* BSL_UIO */ 38 /* Derive the child-features of uio. */ 39 #ifdef HITLS_BSL_UIO 40 #ifndef HITLS_BSL_UIO_PLT 41 #define HITLS_BSL_UIO_PLT 42 #endif 43 #ifndef HITLS_BSL_UIO_BUFFER 44 #define HITLS_BSL_UIO_BUFFER 45 #endif 46 #ifndef HITLS_BSL_UIO_SCTP 47 #define HITLS_BSL_UIO_SCTP 48 #endif 49 #ifndef HITLS_BSL_UIO_UDP 50 #define HITLS_BSL_UIO_UDP 51 #endif 52 #ifndef HITLS_BSL_UIO_TCP 53 #define HITLS_BSL_UIO_TCP 54 #endif 55 #ifndef HITLS_BSL_UIO_MEM 56 #define HITLS_BSL_UIO_MEM 57 #endif 58 #endif 59 60 /* Derive the child-features of uio mem. */ 61 #if defined(HITLS_BSL_UIO_MEM) 62 #ifndef HITLS_BSL_SAL_MEM 63 #define HITLS_BSL_SAL_MEM 64 #endif 65 #ifndef HITLS_BSL_BUFFER 66 #define HITLS_BSL_BUFFER 67 #endif 68 #endif 69 70 /* Derive the dependency features of uio_tcp and uio_sctp. */ 71 #if defined(HITLS_BSL_UIO_TCP) || defined(HITLS_BSL_UIO_SCTP) 72 #ifndef HITLS_BSL_SAL_NET 73 #define HITLS_BSL_SAL_NET 74 #endif 75 #endif 76 77 /* Derive parent feature from child features. */ 78 #if defined(HITLS_BSL_UIO_BUFFER) || defined(HITLS_BSL_UIO_SCTP) || defined(HITLS_BSL_UIO_TCP) || \ 79 defined(HITLS_BSL_UIO_MEM) 80 #ifndef HITLS_BSL_UIO_PLT 81 #define HITLS_BSL_UIO_PLT 82 #endif 83 #endif 84 85 #ifdef HITLS_BSL_PEM 86 #ifndef HITLS_BSL_BASE64 87 #define HITLS_BSL_BASE64 88 #endif 89 #endif 90 91 #ifdef HITLS_BSL_ASN1 92 #ifndef HITLS_BSL_SAL_TIME 93 #define HITLS_BSL_SAL_TIME 94 #endif 95 #endif 96 97 #endif /* HITLS_CONFIG_LAYER_BSL_H */