| /* Copyright 2019-2020 NXP |
| * |
| * SPDX-License-Identifier: Apache-2.0 |
| */ |
| |
| /* # CMake Features : Start */ |
| |
| |
| /** Applet : The Secure Element Applet |
| * |
| * You can compile host library for different Applets listed below. |
| * Please note, some of these Applets may be for NXP Internal use only. |
| */ |
| |
| /** Compiling without any Applet Support */ |
| #cmakedefine01 SSS_HAVE_APPLET_NONE |
| |
| /** A71CH (ECC) */ |
| #cmakedefine01 SSS_HAVE_APPLET_A71CH |
| |
| /** A71CL (RSA) */ |
| #cmakedefine01 SSS_HAVE_APPLET_A71CL |
| |
| /** Similar to A71CH */ |
| #cmakedefine01 SSS_HAVE_APPLET_A71CH_SIM |
| |
| /** SE050 Type A (ECC) */ |
| #cmakedefine01 SSS_HAVE_APPLET_SE05X_A |
| |
| /** SE050 Type B (RSA) */ |
| #cmakedefine01 SSS_HAVE_APPLET_SE05X_B |
| |
| /** SE050 (Super set of A + B) */ |
| #cmakedefine01 SSS_HAVE_APPLET_SE05X_C |
| |
| /** SE050 (Similar to A71CL) */ |
| #cmakedefine01 SSS_HAVE_APPLET_SE05X_L |
| |
| /** NXP Internal testing Applet */ |
| #cmakedefine01 SSS_HAVE_APPLET_LOOPBACK |
| |
| |
| /** SE05X_Ver : SE50 Applet version. |
| * |
| * 03_XX would only enable features of version 03.XX version of applet. |
| * But, this would be compatibility would be added for newer versions of the Applet. |
| * When 04_XX is selected, it would expose features available in 04_XX at compile time. |
| */ |
| |
| /** Any version of SE05X Applet */ |
| #cmakedefine01 SSS_HAVE_SE05X_VER_ANY |
| |
| /** SE050 */ |
| #cmakedefine01 SSS_HAVE_SE05X_VER_03_XX |
| |
| /** NXP Internal - 4.4 */ |
| #cmakedefine01 SSS_HAVE_SE05X_VER_04_04 |
| |
| /** NXP Internal - 4.8 */ |
| #cmakedefine01 SSS_HAVE_SE05X_VER_04_08 |
| |
| |
| /** SMCOM : Communication Interface |
| * |
| * How the host library communicates to the Secure Element. |
| * This may be directly over an I2C interface on embedded platform. |
| * Or sometimes over Remote protocol like JRCP_V1 / JRCP_V2 / VCOM from PC. |
| */ |
| |
| /** Not using any Communication layer */ |
| #cmakedefine01 SSS_HAVE_SMCOM_NONE |
| |
| /** Socket Interface New Implementation */ |
| #cmakedefine01 SSS_HAVE_SMCOM_JRCP_V2 |
| |
| /** Socket Interface Old Implementation. |
| # This is the interface used from Host PC when when we run jrcpv1_server |
| # from the linux PC. */ |
| #cmakedefine01 SSS_HAVE_SMCOM_JRCP_V1 |
| |
| /** Virtual COM Port */ |
| #cmakedefine01 SSS_HAVE_SMCOM_VCOM |
| |
| /** Smart Card I2C for A71CH and A71CH */ |
| #cmakedefine01 SSS_HAVE_SMCOM_SCI2C |
| |
| /** T=1 over I2C for SE050 */ |
| #cmakedefine01 SSS_HAVE_SMCOM_T1OI2C |
| |
| /** GP Spec */ |
| #cmakedefine01 SSS_HAVE_SMCOM_T1OI2C_GP1_0 |
| |
| /** Via RC663 Over VCOM Interface from Windows PC */ |
| #cmakedefine01 SSS_HAVE_SMCOM_RC663_VCOM |
| |
| /** NFC Interface using PN7150 */ |
| #cmakedefine01 SSS_HAVE_SMCOM_PN7150 |
| |
| /** Thread Mode interface */ |
| #cmakedefine01 SSS_HAVE_SMCOM_THREAD |
| |
| /** CCID PC/SC reader interface */ |
| #cmakedefine01 SSS_HAVE_SMCOM_PCSC |
| |
| |
| /** HostCrypto : Counterpart Crypto on Host |
| * |
| * What is being used as a cryptographic library on the host. |
| * As of now only OpenSSL / mbedTLS is supported |
| */ |
| |
| /** Use mbedTLS as host crypto */ |
| #cmakedefine01 SSS_HAVE_HOSTCRYPTO_MBEDTLS |
| |
| /** Use mbed-crypto as host crypto */ |
| #cmakedefine01 SSS_HAVE_HOSTCRYPTO_MBEDCRYPTO |
| |
| /** Use OpenSSL as host crypto */ |
| #cmakedefine01 SSS_HAVE_HOSTCRYPTO_OPENSSL |
| |
| |
| /** RTOS : Choice of Operating system |
| * |
| * Default would mean nothing special. |
| * i.e. Without any RTOS on embedded system, or default APIs on PC/Linux |
| */ |
| |
| /** No specific RTOS. Either bare matal on embedded system or native linux or Windows OS */ |
| #cmakedefine01 SSS_HAVE_RTOS_DEFAULT |
| |
| /** Free RTOS for embedded systems */ |
| #cmakedefine01 SSS_HAVE_RTOS_FREERTOS |
| |
| |
| /** mbedTLS_ALT : ALT Engine implementation for mbedTLS |
| * |
| * When set to None, mbedTLS would not use ALT Implementation to connect to / use Secure Element. |
| * This needs to be set to SSS for Cloud Demos over SSS APIs |
| */ |
| |
| /** */ |
| #cmakedefine01 SSS_HAVE_MBEDTLS_ALT_NONE |
| |
| /** Use SSS Layer ALT implementation */ |
| #cmakedefine01 SSS_HAVE_MBEDTLS_ALT_SSS |
| |
| /** Legacy implementation */ |
| #cmakedefine01 SSS_HAVE_MBEDTLS_ALT_A71CH |
| |
| |
| /** SCP : Secure Channel Protocol |
| * |
| * In case we enable secure channel to Secure Element, which interface to be used. |
| */ |
| |
| /** */ |
| #cmakedefine01 SSS_HAVE_SCP_NONE |
| |
| /** Use SSS Layer for SCP. Used for SE050 family. */ |
| #cmakedefine01 SSS_HAVE_SCP_SCP03_SSS |
| |
| /** Use Host Crypto Layer for SCP03. Legacy implementation. Used for older demos of A71CH Family. */ |
| #cmakedefine01 SSS_HAVE_SCP_SCP03_HOSTCRYPTO |
| |
| |
| /** A71CH_AUTH : A71CH Authentication |
| * |
| * This settings is used by SSS-API based examples to connect using either plain or authenticated to the A71CH. |
| */ |
| |
| /** Plain communication, not authenticated or encrypted */ |
| #cmakedefine01 SSS_HAVE_A71CH_AUTH_NONE |
| |
| /** SCP03 enabled */ |
| #cmakedefine01 SSS_HAVE_A71CH_AUTH_SCP03 |
| |
| /* ====================================================================== * |
| * == Feature selection/values ========================================== * |
| * ====================================================================== */ |
| |
| |
| /** SE05X Secure Element : Symmetric AES */ |
| #cmakedefine01 SSSFTR_SE05X_AES |
| |
| /** SE05X Secure Element : Elliptic Curve Cryptography */ |
| #cmakedefine01 SSSFTR_SE05X_ECC |
| |
| /** SE05X Secure Element : RSA */ |
| #cmakedefine01 SSSFTR_SE05X_RSA |
| |
| /** SE05X Secure Element : KEY operations : SET Key */ |
| #cmakedefine01 SSSFTR_SE05X_KEY_SET |
| |
| /** SE05X Secure Element : KEY operations : GET Key */ |
| #cmakedefine01 SSSFTR_SE05X_KEY_GET |
| |
| /** SE05X Secure Element : Authenticate via ECKey */ |
| #cmakedefine01 SSSFTR_SE05X_AuthECKey |
| |
| /** SE05X Secure Element : Allow creation of user/authenticated session. |
| * |
| * If the intended deployment only uses Platform SCP |
| * Or it is a pure session less integration, this can |
| * save some code size. */ |
| #cmakedefine01 SSSFTR_SE05X_AuthSession |
| |
| /** SE05X Secure Element : Allow creation/deletion of Crypto Objects |
| * |
| * If disabled, new Crytpo Objects are neither created and |
| * old/existing Crypto Objects are not deleted. |
| * It is assumed that during provisioning phase, the required |
| * Crypto Objects are pre-created or they are never going to |
| * be needed. */ |
| #cmakedefine01 SSSFTR_SE05X_CREATE_DELETE_CRYPTOOBJ |
| |
| /** Software : Symmetric AES */ |
| #cmakedefine01 SSSFTR_SW_AES |
| |
| /** Software : Elliptic Curve Cryptography */ |
| #cmakedefine01 SSSFTR_SW_ECC |
| |
| /** Software : RSA */ |
| #cmakedefine01 SSSFTR_SW_RSA |
| |
| /** Software : KEY operations : SET Key */ |
| #cmakedefine01 SSSFTR_SW_KEY_SET |
| |
| /** Software : KEY operations : GET Key */ |
| #cmakedefine01 SSSFTR_SW_KEY_GET |
| |
| /** Software : Used as a test counterpart |
| * |
| * e.g. Major part of the mebdTLS SSS layer is purely used for |
| * testing of Secure Element implementation, and can be avoided |
| * fully during many production scenarios. */ |
| #cmakedefine01 SSSFTR_SW_TESTCOUNTERPART |
| |
| /* ====================================================================== * |
| * == Computed Options ================================================== * |
| * ====================================================================== */ |
| |
| /** Symmetric AES */ |
| #define SSSFTR_AES (SSSFTR_SE05X_AES + SSSFTR_SW_AES) |
| /** Elliptic Curve Cryptography */ |
| #define SSSFTR_ECC (SSSFTR_SE05X_ECC + SSSFTR_SW_ECC) |
| /** RSA */ |
| #define SSSFTR_RSA (SSSFTR_SE05X_RSA + SSSFTR_SW_RSA) |
| /** KEY operations : SET Key */ |
| #define SSSFTR_KEY_SET (SSSFTR_SE05X_KEY_SET + SSSFTR_SW_KEY_SET) |
| /** KEY operations : GET Key */ |
| #define SSSFTR_KEY_GET (SSSFTR_SE05X_KEY_GET + SSSFTR_SW_KEY_GET) |
| /** KEY operations */ |
| #define SSSFTR_KEY (SSSFTR_KEY_SET + SSSFTR_KEY_GET) |
| /** KEY operations */ |
| #define SSSFTR_SE05X_KEY (SSSFTR_SE05X_KEY_SET + SSSFTR_SE05X_KEY_GET) |
| /** KEY operations */ |
| #define SSSFTR_SW_KEY (SSSFTR_SW_KEY_SET + SSSFTR_SW_KEY_GET) |
| |
| |
| #define SSS_HAVE_APPLET \ |
| (SSS_HAVE_APPLET_A71CH | SSS_HAVE_APPLET_A71CL | SSS_HAVE_APPLET_A71CH_SIM | SSS_HAVE_APPLET_SE05X_A | SSS_HAVE_APPLET_SE05X_B | SSS_HAVE_APPLET_SE05X_C | SSS_HAVE_APPLET_SE05X_L | SSS_HAVE_APPLET_LOOPBACK) |
| |
| #define SSS_HAVE_APPLET_SE05X_IOT \ |
| (SSS_HAVE_APPLET_SE05X_A | SSS_HAVE_APPLET_SE05X_B | SSS_HAVE_APPLET_SE05X_C) |
| |
| #define SSS_HAVE_MBEDTLS_ALT \ |
| (SSS_HAVE_MBEDTLS_SSS | SSS_HAVE_MBEDTLS_A71CH) |
| |
| /** Deprecated items. Used here for backwards compatibility. */ |
| |
| #define WithApplet_SE05X (SSS_HAVE_APPLET_SE05X_IOT) |
| #define WithApplet_SE050_A (SSS_HAVE_APPLET_SE05X_A) |
| #define WithApplet_SE050_B (SSS_HAVE_APPLET_SE05X_B) |
| #define WithApplet_SE050_C (SSS_HAVE_APPLET_SE05X_C) |
| #define SSS_HAVE_SE050_A (SSS_HAVE_APPLET_SE05X_A) |
| #define SSS_HAVE_SE050_B (SSS_HAVE_APPLET_SE05X_B) |
| #define SSS_HAVE_SE050_C (SSS_HAVE_APPLET_SE05X_C) |
| #define SSS_HAVE_SE05X (SSS_HAVE_APPLET_SE05X_IOT) |
| #define SSS_HAVE_SE (SSS_HAVE_APPLET) |
| #define SSS_HAVE_A71CH (SSS_HAVE_APPLET_A71CH) |
| #define SSS_HAVE_A71CL (SSS_HAVE_APPLET_A71CL) |
| #define SSS_HAVE_A71CH_SIM (SSS_HAVE_APPLET_A71CH_SIM) |
| #define SSS_HAVE_LOOPBACK (SSS_HAVE_APPLET_LOOPBACK) |
| #define SSS_HAVE_OPENSSL (SSS_HAVE_HOSTCRYPTO_OPENSSL) |
| #define SSS_HAVE_MBEDTLS (SSS_HAVE_HOSTCRYPTO_MBEDTLS) |
| #define SSS_HAVE_MBEDCRYPTO (SSS_HAVE_HOSTCRYPTO_MBEDCRYPTO) |
| #define SSS_HAVE_ALT_SSS (SSS_HAVE_MBEDTLS_ALT_SSS) |
| #define SSS_HAVE_ALT (SSS_HAVE_MBEDTLS_ALT) |
| #define WithApplet_None (SSS_HAVE_APPLET_NONE) |
| #define SSS_HAVE_None (SSS_HAVE_APPLET_NONE) |
| #define WithApplet_A71CH (SSS_HAVE_APPLET_A71CH) |
| #define SSS_HAVE_A71CH (SSS_HAVE_APPLET_A71CH) |
| #define WithApplet_A71CL (SSS_HAVE_APPLET_A71CL) |
| #define SSS_HAVE_A71CL (SSS_HAVE_APPLET_A71CL) |
| #define WithApplet_A71CH_SIM (SSS_HAVE_APPLET_A71CH_SIM) |
| #define SSS_HAVE_A71CH_SIM (SSS_HAVE_APPLET_A71CH_SIM) |
| #define WithApplet_SE05X_A (SSS_HAVE_APPLET_SE05X_A) |
| #define SSS_HAVE_SE05X_A (SSS_HAVE_APPLET_SE05X_A) |
| #define WithApplet_SE05X_B (SSS_HAVE_APPLET_SE05X_B) |
| #define SSS_HAVE_SE05X_B (SSS_HAVE_APPLET_SE05X_B) |
| #define WithApplet_SE05X_C (SSS_HAVE_APPLET_SE05X_C) |
| #define SSS_HAVE_SE05X_C (SSS_HAVE_APPLET_SE05X_C) |
| #define WithApplet_SE05X_L (SSS_HAVE_APPLET_SE05X_L) |
| #define SSS_HAVE_SE05X_L (SSS_HAVE_APPLET_SE05X_L) |
| #define WithApplet_LoopBack (SSS_HAVE_APPLET_LOOPBACK) |
| #define SSS_HAVE_LoopBack (SSS_HAVE_APPLET_LOOPBACK) |
| #define SSS_HAVE_MBEDTLS (SSS_HAVE_HOSTCRYPTO_MBEDTLS) |
| #define SSS_HAVE_MBEDCRYPTO (SSS_HAVE_HOSTCRYPTO_MBEDCRYPTO) |
| #define SSS_HAVE_OPENSSL (SSS_HAVE_HOSTCRYPTO_OPENSSL) |
| |
| /* # CMake Features : END */ |