From 0839da9e85c9bed0b09d26ba41b85ce11721cd20 Mon Sep 17 00:00:00 2001 From: rjbrown2 Date: Wed, 28 Aug 2024 18:19:17 +0000 Subject: [PATCH 1/3] [nasa/Cryptolib#274] Update Typo for 1.3.1 Release --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f53101a7..a408afb8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,7 +50,7 @@ option(MC_CUSTOM_PATH "Custom Monitoring and Control path" OFF) option(MC_DISABLED "Monitoring and Control - Disabled" OFF) option(MC_INTERNAL "Monitoring and Control - Internal" ON) option(SA_CUSTOM "Security Association - Custom" OFF) -option(SA_CUSTOM_PATH "Custion Security Association Path" OFF) +option(SA_CUSTOM_PATH "Custom Security Association Path" OFF) option(SA_INTERNAL "Security Association - Internal" ON) option(SA_MARIADB "Security Association - MariaDB" OFF) option(SUPPORT "Support" OFF) From 94e2055d2816459dbc33e25ff1d5365e50d6a2b2 Mon Sep 17 00:00:00 2001 From: rjbrown2 Date: Wed, 28 Aug 2024 18:21:40 +0000 Subject: [PATCH 2/3] [nasa/Cryptolib#274 Add Define for GVCID Managed Parameters array size --- include/crypto_config.h | 2 ++ src/core/crypto_config.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/crypto_config.h b/include/crypto_config.h index 7ae23b8a..ac09c723 100644 --- a/include/crypto_config.h +++ b/include/crypto_config.h @@ -56,6 +56,8 @@ #define RESET #endif +// Managed Parameters Size +#define GVCID_MAN_PARAM_SIZE 250 // Max Frame Size #define TC_MAX_FRAME_SIZE 1024 diff --git a/src/core/crypto_config.c b/src/core/crypto_config.c index aeae80b4..c2c02f48 100644 --- a/src/core/crypto_config.c +++ b/src/core/crypto_config.c @@ -37,7 +37,7 @@ CryptoConfig_t crypto_config; CryptographyKmcCryptoServiceConfig_t* cryptography_kmc_crypto_config = NULL; CamConfig_t* cam_config = NULL; -GvcidManagedParameters_t gvcid_managed_parameters_array[250]; //Arbitrary 250 for now. +GvcidManagedParameters_t gvcid_managed_parameters_array[GVCID_MAN_PARAM_SIZE]; int gvcid_counter = 0; GvcidManagedParameters_t gvcid_null_struct = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; GvcidManagedParameters_t current_managed_parameters_struct = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; From 3f515f6b410510dbf5548ca282de4414f1a98982 Mon Sep 17 00:00:00 2001 From: rjbrown2 Date: Wed, 28 Aug 2024 18:23:58 +0000 Subject: [PATCH 3/3] [nasa/Cryptolib#274 Add Define for GVCID Managed Parameters array size --- src/core/crypto_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/crypto_config.c b/src/core/crypto_config.c index c2c02f48..ceee50d7 100644 --- a/src/core/crypto_config.c +++ b/src/core/crypto_config.c @@ -532,7 +532,7 @@ int32_t Crypto_Config_Cam(uint8_t cam_enabled, char* cookie_file_path, char* key int32_t Crypto_Config_Add_Gvcid_Managed_Parameters(GvcidManagedParameters_t gvcid_managed_parameters_struct) { int32_t status = CRYPTO_LIB_SUCCESS; - if (gvcid_counter > 250) + if (gvcid_counter > GVCID_MAN_PARAM_SIZE) { status = CRYPTO_LIB_ERR_EXCEEDS_MANAGED_PARAMETER_MAX_LIMIT; }