Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nos3#88 cfs upgrade #194

Merged
merged 3 commits into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# [email protected]

cmake_minimum_required(VERSION 3.14.0)
project(CRYPTO C)
project(crypto C)

#
# Define Build Flags
Expand Down
1 change: 1 addition & 0 deletions include/crypto.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ extern int32_t Crypto_Init_With_Configs(
CryptoConfig_t* crypto_config_p, GvcidManagedParameters_t* gvcid_managed_parameters_p,
SadbMariaDBConfig_t* sa_mariadb_config_p,
CryptographyKmcCryptoServiceConfig_t* cryptography_kmc_crypto_config_p); // Initialize CryptoLib With Application Defined Configuration
extern int32_t Crypto_TC_Init(void);
extern int32_t Crypto_Init_TC_Unit_Test(void); // Initialize CryptoLib with unit test default Configurations
extern int32_t Crypto_Init_TM_Unit_Test(void); // Initialize CryptoLib with unit test default Configurations

Expand Down
52 changes: 26 additions & 26 deletions include/crypto_config.h
dccutrig marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
#define ABM_SIZE 1786 // 20 /* bytes */
#define ARSN_SIZE 20 /* total messages */
#define ARSNW_SIZE 1 /* bytes */
#define SN_SIZE 0
#define SN_SIZE 16
#define CHALLENGE_SIZE 16 /* bytes */
#define CHALLENGE_MAC_SIZE 16 /* bytes */

Expand All @@ -136,33 +136,33 @@

// Procedure Identification (PID)
// Service Group - Key Management
#define SG_KEY_MGMT 0b00
#define PID_OTAR 0b0001
#define PID_KEY_ACTIVATION 0b0010
#define PID_KEY_DEACTIVATION 0b0011
#define PID_KEY_VERIFICATION 0b0100
#define PID_KEY_DESTRUCTION 0b0110
#define PID_KEY_INVENTORY 0b0111
#define SG_KEY_MGMT 0x00 // 0b00
#define PID_OTAR 0x01 // 0b0001
#define PID_KEY_ACTIVATION 0x02 // 0b0010
#define PID_KEY_DEACTIVATION 0x03 //0b0011
#define PID_KEY_VERIFICATION 0x04 // 0b0100
#define PID_KEY_DESTRUCTION 0x06 // 0b0110
#define PID_KEY_INVENTORY 0x07 // 0b0111
// Service Group - Security Association Management
#define SG_SA_MGMT 0b01
#define PID_CREATE_SA 0b0001
#define PID_REKEY_SA 0b0110
#define PID_START_SA 0b1011
#define PID_STOP_SA 0b1110
#define PID_EXPIRE_SA 0b1001
#define PID_DELETE_SA 0b0100
#define PID_SET_ARSN 0b1010
#define PID_SET_ARSNW 0b0101
#define PID_READ_ARSN 0b0000
#define PID_SA_STATUS 0b1111
#define SG_SA_MGMT 0x01 // 0b01
#define PID_CREATE_SA 0x01 //0b0001
#define PID_REKEY_SA 0x05 //0b0110
#define PID_START_SA 0x0B //0b1011
#define PID_STOP_SA 0x0E // 0b1110
#define PID_EXPIRE_SA 0x09 // 0b1001
#define PID_DELETE_SA 0x04 // 0b0100
#define PID_SET_ARSN 0x0A //0b1010
#define PID_SET_ARSNW 0x06 // 0b0101
#define PID_READ_ARSN 0x00 // 0b0000
#define PID_SA_STATUS 0x0F // 0b1111
// Service Group - Security Monitoring & Control
#define SG_SEC_MON_CTRL 0b11
#define PID_PING 0b0001
#define PID_LOG_STATUS 0b0010
#define PID_DUMP_LOG 0b0011
#define PID_ERASE_LOG 0b0100
#define PID_SELF_TEST 0b0101
#define PID_ALARM_FLAG 0b0111
#define SG_SEC_MON_CTRL 0x03 // 0b11
#define PID_PING 0x01 // 0b0001
#define PID_LOG_STATUS 0x02 //0b0010
#define PID_DUMP_LOG 0x03 // 0b0011
#define PID_ERASE_LOG 0x04 // 0b0100
#define PID_SELF_TEST 0x05 // 0b0101
#define PID_ALARM_FLAG 0x07 // 0b0111

// TC Defines
#define TC_SH_SIZE 8 /* bits */
Expand Down
2 changes: 1 addition & 1 deletion include/crypto_error.h
dccutrig marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ extern char *crypto_enum_errlist_crypto_if[];
extern char *crypto_enum_errlist_crypto_kmc[];
extern char *crypto_enum_errlist_crypto_cam[];

#define CRYPTO_UNDEFINED_ERROR "CRYPTO_UNDEFINED_ERROR_CODE"
#define CRYPTO_UNDEFINED_ERROR (char*) "CRYPTO_UNDEFINED_ERROR_CODE"


#endif //CRYPTO_ERROR_H
25 changes: 13 additions & 12 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,42 +105,43 @@ endif()
# Create the app module
if(DEFINED CFE_SYSTEM_PSPNAME)
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/cpu${TGTSYS_${SYSVAR}}/${INSTALL_SUBDIR}")
add_cfe_app(Crypto ${LIB_SRC_FILES})
add_cfe_app(crypto ${LIB_SRC_FILES})
else()
# Standalone build
add_library(Crypto SHARED ${LIB_SRC_FILES})
add_library(crypto SHARED ${LIB_SRC_FILES})
endif()

if(CRYPTO_LIBGCRYPT)
target_link_libraries(Crypto gcrypt)
target_link_libraries(crypto gcrypt)
endif()

if(CRYPTO_KMC)
target_link_libraries(Crypto curl)
target_link_libraries(crypto curl)
endif()

if(SA_MARIADB)
execute_process(COMMAND mysql_config --cflags
OUTPUT_VARIABLE MYSQL_CFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND mysql_config --libs
OUTPUT_VARIABLE MYSQL_LIBS OUTPUT_STRIP_TRAILING_WHITESPACE)
target_compile_options(Crypto PUBLIC ${MYSQL_CFLAGS})
target_link_libraries(Crypto ${MYSQL_LIBS})
target_compile_options(crypto PUBLIC ${MYSQL_CFLAGS})
target_link_libraries(crypto ${MYSQL_LIBS})
endif()

file(GLOB CRYPTO_INCLUDES ../include/*.h)
set_target_properties(Crypto PROPERTIES PUBLIC_HEADER "${CRYPTO_INCLUDES}")
set_target_properties(crypto PROPERTIES PUBLIC_HEADER "${CRYPTO_INCLUDES}")

add_custom_command(TARGET Crypto POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:Crypto> ${PROJECT_BINARY_DIR}/lib/libCrypto.so
add_custom_command(TARGET crypto POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:crypto> ${PROJECT_BINARY_DIR}/lib/libcrypto.so
COMMENT "Created ${PROJECT_BINARY_DIR}/lib/libCrypto.so"
)

if(DEFINED CFE_SYSTEM_PSPNAME)
install(TARGETS Crypto
DESTINATION ${CMAKE_INSTALL_PREFIX}/cpu${TGTSYS_${SYSVAR}}/${INSTALL_SUBDIR})
install(TARGETS crypto
DESTINATION ${CMAKE_INSTALL_PREFIX}/${TGTSYS_${SYSVAR}}/${INSTALL_SUBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_PREFIX}/host)
else()
install(TARGETS Crypto
install(TARGETS crypto
DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_PREFIX}/include)
endif()
Expand Down
14 changes: 13 additions & 1 deletion src/core/crypto_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,17 @@ int32_t crypto_free_config_structs(void);
** Initialization Functions
*/

/**
* @brief Function: Crypto_Init_TC_Unit_Test
* @return int32: status
**/
int32_t Crypto_TC_Init(void)
{
int32_t status = CRYPTO_LIB_SUCCESS;
status = Crypto_Init_TC_Unit_Test();
return status;
}

/**
* @brief Function: Crypto_Init_TC_Unit_Test
* @return int32: status
Expand Down Expand Up @@ -383,7 +394,8 @@ int32_t Crypto_Config_Kmc_Crypto_Service(char* protocol, char* kmc_crypto_hostna
if(kmc_crypto_app != NULL){
cryptography_kmc_crypto_config->kmc_crypto_app_uri = crypto_deep_copy_string(kmc_crypto_app);
} else{
cryptography_kmc_crypto_config->kmc_crypto_app_uri = crypto_deep_copy_string("crypto-service");
char* crypto_service_tmp = (char*) "crypto-service";
cryptography_kmc_crypto_config->kmc_crypto_app_uri = crypto_deep_copy_string(crypto_service_tmp);
}

cryptography_kmc_crypto_config->mtls_client_cert_path = crypto_deep_copy_string(mtls_client_cert_path);
Expand Down
172 changes: 86 additions & 86 deletions src/core/crypto_error.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,113 +21,113 @@

char *crypto_enum_errlist_core[] =
{
"CRYPTO_LIB_SUCCESS"
,"CRYPTO_LIB_ERROR"
,"CRYPTO_LIB_ERR_NO_INIT"
,"CRYPTO_LIB_ERR_INVALID_TFVN"
,"CRYPTO_LIB_ERR_INVALID_SCID"
,"CRYPTO_LIB_ERR_INVALID_VCID"
,"CRYPTO_LIB_ERR_INVALID_MAPID"
,"CRYPTO_LIB_ERR_INVALID_CC_FLAG"
,"CRYPTO_LIB_ERR_NO_OPERATIONAL_SA"
,"CRYPTO_LIB_ERR_NULL_BUFFER"
,"CRYPTO_LIB_ERR_UT_BYTE_MISMATCH"
,"CRYPTO_LIB_ERR_NO_CONFIG"
,"CRYPTO_LIB_ERR_INVALID_FECF"
,"CRYPTO_LIB_ERR_ARSN_OUTSIDE_WINDOW"
,"CRYPTO_LIB_ERR_LIBGCRYPT_ERROR"
,"CRYPTO_LIB_ERR_AUTHENTICATION_ERROR"
,"CRYPTO_LIB_ERR_NULL_IV"
,"CRYPTO_LIB_ERR_NULL_ABM"
,"CRYPTO_LIB_ERR_DECRYPT_ERROR"
,"CRYPTO_LIB_ERR_ABM_TOO_SHORT_FOR_AAD"
,"CRYPTO_LIB_ERR_MAC_RETRIEVAL_ERROR"
,"CRYPTO_LIB_ERR_MAC_VALIDATION_ERROR"
,"CRYPTO_LIB_ERR_INVALID_HEADER"
,"CRYPTO_LIB_ERR_IV_OUTSIDE_WINDOW"
,"CRYPTO_LIB_ERR_NULL_ARSN"
,"CRYPTO_LIB_ERR_NULL_SA"
,"CRYPTO_LIB_ERR_UNSUPPORTED_ACS"
,"CRYPTO_LIB_ERR_ENCRYPTION_ERROR"
,"CRYPTO_LIB_ERR_INVALID_SA_CONFIGURATION"
,"CRYPTO_LIB_ERR_TC_FRAME_SIZE_EXCEEDS_MANAGED_PARAM_MAX_LIMIT"
,"CRYPTO_LIB_ERR_TC_FRAME_SIZE_EXCEEDS_SPEC_LIMIT"
,"CRYPTO_LIB_ERR_UNSUPPORTED_ECS"
,"CRYPTO_LIB_ERR_KEY_LENGTH_ERROR"
,"CRYPTO_LIB_ERR_NULL_ECS_PTR"
,"CRYPTO_LIB_ERR_IV_NOT_SUPPORTED_FOR_ACS_ALGO"
,"CRYPTO_LIB_ERR_NULL_CIPHERS"
,"CRYPTO_LIB_ERR_NO_ECS_SET_FOR_ENCRYPTION_MODE"
,"CRYPTO_LIB_ERR_IV_LEN_SHORTER_THAN_SEC_HEADER_LENGTH"
,"CRYPTO_LIB_ERR_ARSN_LEN_SHORTER_THAN_SEC_HEADER_LENGTH"
,"CRYPTO_LIB_ERR_FRAME_COUNTER_DOESNT_MATCH_SA"
,"CRYPTO_LIB_ERR_INPUT_FRAME_TOO_SHORT_FOR_TC_STANDARD"
,"CRYPTO_LIB_ERR_INPUT_FRAME_LENGTH_SHORTER_THAN_FRAME_HEADERS_LENGTH"
,"CRYPTO_LIB_ERR_UNSUPPORTED_ECS_MODE"
,"CRYPTO_LIB_ERR_NULL_MODE_PTR"
,"CRYPTO_LIB_ERR_UNSUPPORTED_MODE"
,"CRYPTO_LIB_ERR_INPUT_FRAME_TOO_SHORT_FOR_TM_STANDARD"
,"CRYPTO_LIB_ERR_TC_ENUM_USED_FOR_TM_CONFIG"
,"CRYPTO_LIB_ERR_KEY_ID_ERROR"
(char*) "CRYPTO_LIB_SUCCESS",
(char*) "CRYPTO_LIB_ERROR",
(char*) "CRYPTO_LIB_ERR_NO_INIT",
(char*) "CRYPTO_LIB_ERR_INVALID_TFVN",
(char*) "CRYPTO_LIB_ERR_INVALID_SCID",
(char*) "CRYPTO_LIB_ERR_INVALID_VCID",
(char*) "CRYPTO_LIB_ERR_INVALID_MAPID",
(char*) "CRYPTO_LIB_ERR_INVALID_CC_FLAG",
(char*) "CRYPTO_LIB_ERR_NO_OPERATIONAL_SA",
(char*) "CRYPTO_LIB_ERR_NULL_BUFFER",
(char*) "CRYPTO_LIB_ERR_UT_BYTE_MISMATCH",
(char*) "CRYPTO_LIB_ERR_NO_CONFIG",
(char*) "CRYPTO_LIB_ERR_INVALID_FECF",
(char*) "CRYPTO_LIB_ERR_ARSN_OUTSIDE_WINDOW",
(char*) "CRYPTO_LIB_ERR_LIBGCRYPT_ERROR",
(char*) "CRYPTO_LIB_ERR_AUTHENTICATION_ERROR",
(char*) "CRYPTO_LIB_ERR_NULL_IV",
(char*) "CRYPTO_LIB_ERR_NULL_ABM",
(char*) "CRYPTO_LIB_ERR_DECRYPT_ERROR",
(char*) "CRYPTO_LIB_ERR_ABM_TOO_SHORT_FOR_AAD",
(char*) "CRYPTO_LIB_ERR_MAC_RETRIEVAL_ERROR",
(char*) "CRYPTO_LIB_ERR_MAC_VALIDATION_ERROR",
(char*) "CRYPTO_LIB_ERR_INVALID_HEADER",
(char*) "CRYPTO_LIB_ERR_IV_OUTSIDE_WINDOW",
(char*) "CRYPTO_LIB_ERR_NULL_ARSN",
(char*) "CRYPTO_LIB_ERR_NULL_SA",
(char*) "CRYPTO_LIB_ERR_UNSUPPORTED_ACS",
(char*) "CRYPTO_LIB_ERR_ENCRYPTION_ERROR",
(char*) "CRYPTO_LIB_ERR_INVALID_SA_CONFIGURATION",
(char*) "CRYPTO_LIB_ERR_TC_FRAME_SIZE_EXCEEDS_MANAGED_PARAM_MAX_LIMIT",
(char*) "CRYPTO_LIB_ERR_TC_FRAME_SIZE_EXCEEDS_SPEC_LIMIT",
(char*) "CRYPTO_LIB_ERR_UNSUPPORTED_ECS",
(char*) "CRYPTO_LIB_ERR_KEY_LENGTH_ERROR",
(char*) "CRYPTO_LIB_ERR_NULL_ECS_PTR",
(char*) "CRYPTO_LIB_ERR_IV_NOT_SUPPORTED_FOR_ACS_ALGO",
(char*) "CRYPTO_LIB_ERR_NULL_CIPHERS",
(char*) "CRYPTO_LIB_ERR_NO_ECS_SET_FOR_ENCRYPTION_MODE",
(char*) "CRYPTO_LIB_ERR_IV_LEN_SHORTER_THAN_SEC_HEADER_LENGTH",
(char*) "CRYPTO_LIB_ERR_ARSN_LEN_SHORTER_THAN_SEC_HEADER_LENGTH",
(char*) "CRYPTO_LIB_ERR_FRAME_COUNTER_DOESNT_MATCH_SA",
(char*) "CRYPTO_LIB_ERR_INPUT_FRAME_TOO_SHORT_FOR_TC_STANDARD",
(char*) "CRYPTO_LIB_ERR_INPUT_FRAME_LENGTH_SHORTER_THAN_FRAME_HEADERS_LENGTH",
(char*) "CRYPTO_LIB_ERR_UNSUPPORTED_ECS_MODE",
(char*) "CRYPTO_LIB_ERR_NULL_MODE_PTR",
(char*) "CRYPTO_LIB_ERR_UNSUPPORTED_MODE",
(char*) "CRYPTO_LIB_ERR_INPUT_FRAME_TOO_SHORT_FOR_TM_STANDARD",
(char*) "CRYPTO_LIB_ERR_TC_ENUM_USED_FOR_TM_CONFIG",
(char*) "CRYPTO_LIB_ERR_KEY_ID_ERROR",
};

char *crypto_enum_errlist_config[] =
{
"CRYPTO_CONFIGURATION_NOT_COMPLETE"
,"CRYPTO_MANAGED_PARAM_CONFIGURATION_NOT_COMPLETE"
,"CRYPTO_MARIADB_CONFIGURATION_NOT_COMPLETE"
,"MANAGED_PARAMETERS_FOR_GVCID_NOT_FOUND"
(char*) "CRYPTO_CONFIGURATION_NOT_COMPLETE",
(char*) "CRYPTO_MANAGED_PARAM_CONFIGURATION_NOT_COMPLETE",
(char*) "CRYPTO_MARIADB_CONFIGURATION_NOT_COMPLETE",
(char*) "MANAGED_PARAMETERS_FOR_GVCID_NOT_FOUND",
};

char *crypto_enum_errlist_sa_if[] =
{
"SADB_INVALID_SADB_TYPE"
,"SADB_NULL_SA_USED"
(char*) "SADB_INVALID_SADB_TYPE",
(char*) "SADB_NULL_SA_USED",
};
char *crypto_enum_errlist_sa_mariadb[] =
{
"SADB_MARIADB_CONNECTION_FAILED"
,"SADB_QUERY_FAILED"
,"SADB_QUERY_EMPTY_RESULTS"
,"SADB_INSERT_FAILED"
(char*) "SADB_MARIADB_CONNECTION_FAILED",
(char*) "SADB_QUERY_FAILED",
(char*) "SADB_QUERY_EMPTY_RESULTS",
(char*) "SADB_INSERT_FAILED",
};
char *crypto_enum_errlist_crypto_if[] =
{
"CRYPTOGRAPHY_INVALID_CRYPTO_INTERFACE_TYPE"
,"CRYPTOGRAPHY_UNSUPPORTED_OPERATION_FOR_KEY_RING"
,"CRYPTOGRAPHY_LIBRARY_INITIALIZIATION_ERROR"
(char*) "CRYPTOGRAPHY_INVALID_CRYPTO_INTERFACE_TYPE",
(char*) "CRYPTOGRAPHY_UNSUPPORTED_OPERATION_FOR_KEY_RING",
(char*) "CRYPTOGRAPHY_LIBRARY_INITIALIZIATION_ERROR",
};
char *crypto_enum_errlist_crypto_kmc[] =
{
"CRYPTOGRAPHY_KMC_CRYPTO_SERVICE_CONFIGURATION_NOT_COMPLETE"
,"CRYPTOGRAPHY_KMC_CURL_INITIALIZATION_FAILURE"
,"CRYPTOGRAHPY_KMC_CRYPTO_SERVICE_CONNECTION_ERROR"
,"CRYPTOGRAHPY_KMC_CRYPTO_SERVICE_AEAD_ENCRYPT_ERROR"
,"CRYPTOGRAHPY_KMC_CRYPTO_SERVICE_AEAD_DECRYPT_ERROR"
,"CRYPTOGRAHPY_KMC_CRYPTO_JSON_PARSE_ERROR"
,"CRYPTOGRAHPY_KMC_CIPHER_TEXT_NOT_FOUND_IN_JSON_RESPONSE"
,"CRYPTOGRAHPY_KMC_CRYPTO_SERVICE_GENERIC_FAILURE"
,"CRYPTOGRAHPY_KMC_CRYPTO_SERVICE_AUTHENTICATION_ERROR"
,"CRYPTOGRAHPY_KMC_CRYPTO_SERVICE_MAC_VALIDATION_ERROR"
,"CRYPTOGRAHPY_KMC_ICV_NOT_FOUND_IN_JSON_RESPONSE"
,"CRYPTOGRAHPY_KMC_NULL_ENCRYPTION_KEY_REFERENCE_IN_SA"
,"CRYPTOGRAHPY_KMC_NULL_AUTHENTICATION_KEY_REFERENCE_IN_SA"
,"CRYPTOGRAHPY_KMC_CRYPTO_SERVICE_EMPTY_RESPONSE"
,"CRYPTOGRAHPY_KMC_CRYPTO_SERVICE_DECRYPT_ERROR"
,"CRYPTOGRAHPY_KMC_CRYPTO_SERVICE_ENCRYPT_ERROR"
(char*) "CRYPTOGRAPHY_KMC_CRYPTO_SERVICE_CONFIGURATION_NOT_COMPLETE",
(char*) "CRYPTOGRAPHY_KMC_CURL_INITIALIZATION_FAILURE",
(char*) "CRYPTOGRAHPY_KMC_CRYPTO_SERVICE_CONNECTION_ERROR",
(char*) "CRYPTOGRAHPY_KMC_CRYPTO_SERVICE_AEAD_ENCRYPT_ERROR",
(char*) "CRYPTOGRAHPY_KMC_CRYPTO_SERVICE_AEAD_DECRYPT_ERROR",
(char*) "CRYPTOGRAHPY_KMC_CRYPTO_JSON_PARSE_ERROR",
(char*) "CRYPTOGRAHPY_KMC_CIPHER_TEXT_NOT_FOUND_IN_JSON_RESPONSE",
(char*) "CRYPTOGRAHPY_KMC_CRYPTO_SERVICE_GENERIC_FAILURE",
(char*) "CRYPTOGRAHPY_KMC_CRYPTO_SERVICE_AUTHENTICATION_ERROR",
(char*) "CRYPTOGRAHPY_KMC_CRYPTO_SERVICE_MAC_VALIDATION_ERROR",
(char*) "CRYPTOGRAHPY_KMC_ICV_NOT_FOUND_IN_JSON_RESPONSE",
(char*) "CRYPTOGRAHPY_KMC_NULL_ENCRYPTION_KEY_REFERENCE_IN_SA",
(char*) "CRYPTOGRAHPY_KMC_NULL_AUTHENTICATION_KEY_REFERENCE_IN_SA",
(char*) "CRYPTOGRAHPY_KMC_CRYPTO_SERVICE_EMPTY_RESPONSE",
(char*) "CRYPTOGRAHPY_KMC_CRYPTO_SERVICE_DECRYPT_ERROR",
(char*) "CRYPTOGRAHPY_KMC_CRYPTO_SERVICE_ENCRYPT_ERROR",
};

char *crypto_enum_errlist_crypto_cam[] =
{
"CAM_CONFIG_NOT_SUPPORTED_ERROR"
,"CAM_INVALID_COOKIE_FILE_CONFIGURATION_NULL"
,"CAM_AUTHENTICATION_FAILURE_REDIRECT"
,"CAM_AUTHENTICATION_REQUIRED"
,"CAM_GET_SSO_TOKEN_FAILURE"
,"CAM_INVALID_CONFIGURATION_ACCESS_MANAGER_URI_NULL"
,"CAM_INVALID_CONFIGURATION_KEYTAB_FILE_PATH_NULL"
,"CAM_INVALID_CONFIGURATION_KEYTAB_FILE_USERNAME_NULL"
,"CAM_KEYTAB_FILE_KINIT_FAILURE"
(char*) "CAM_CONFIG_NOT_SUPPORTED_ERROR",
(char*) "CAM_INVALID_COOKIE_FILE_CONFIGURATION_NULL",
(char*) "CAM_AUTHENTICATION_FAILURE_REDIRECT",
(char*) "CAM_AUTHENTICATION_REQUIRED",
(char*) "CAM_GET_SSO_TOKEN_FAILURE",
(char*) "CAM_INVALID_CONFIGURATION_ACCESS_MANAGER_URI_NULL",
(char*) "CAM_INVALID_CONFIGURATION_KEYTAB_FILE_PATH_NULL",
(char*) "CAM_INVALID_CONFIGURATION_KEYTAB_FILE_USERNAME_NULL",
(char*) "CAM_KEYTAB_FILE_KINIT_FAILURE",
};

/*
Expand Down
4 changes: 2 additions & 2 deletions src/sa/internal/sa_interface_inmemory.template.c
dccutrig marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ int32_t sa_config(void)
sa[10].gvcid_blk.scid = 0x002C;
sa[10].gvcid_blk.vcid = 1;
sa[10].gvcid_blk.mapid = TYPE_TC;
sa[10].ek_ref="kmc/test/key130";
sa[10].ek_ref = (char*) "kmc/test/key130";

// SA 11 - KEYED; ARSNW:5; AES-GCM; IV:00...00; IV-len:12; MAC-len:16; Key-ID: 130
// SA 11 VC0/1 is now 4-VC0, 7-VC1
Expand All @@ -270,7 +270,7 @@ int32_t sa_config(void)
sa[11].gvcid_blk.scid = SCID & 0x3FF;
sa[11].gvcid_blk.vcid = 0;
sa[11].gvcid_blk.mapid = TYPE_TC;
sa[11].ek_ref="kmc/test/key130";
sa[11].ek_ref = (char*) "kmc/test/key130";

// SA 12 - TM CLEAR MODE
// SA 12
Expand Down
Loading
Loading