Skip to content

Commit

Permalink
Merge branch 'dev' into 379-update-cryptolib-dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
rjbrown2 authored Jan 7, 2025
2 parents 4f22edf + 344d043 commit 14ee573
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 5 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ endif()
# Project Specifics
#
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror -g -O0")
set(CMAKE_CROSSCOMPILING "FALSE")

include_directories(include)
add_subdirectory(src)
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@ kmc:

wolf:
./support/scripts/wolf_docker_build.sh

env:
./support/scripts/update_env.sh
9 changes: 8 additions & 1 deletion include/crypto.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ void Crypto_TC_Handle_Padding(uint32_t pkcs_padding, SecurityAssociation_t *s
int32_t Crypto_TC_Set_IV(SecurityAssociation_t *sa_ptr, uint8_t *p_new_enc_frame, uint16_t *index);

// OCF
uint32_t Crypto_Get_FSR();
uint32_t Crypto_Get_FSR(void);
void Crypto_Set_FSR(uint8_t *p_ingest, uint16_t byte_idx, uint16_t pdu_len, SecurityAssociation_t *sa_ptr);

// Telemetry (TM)
Expand All @@ -176,6 +176,13 @@ extern int32_t Crypto_AOS_ProcessSecurity(uint8_t *p_ingest, uint16_t len_ingest
// Crypo Error Support Functions
extern char *Crypto_Get_Error_Code_Enum_String(int32_t crypto_error_code);

/*
** Internal Prototypes
*/

int32_t Crypto_Get_Security_Header_Length(SecurityAssociation_t *sa_ptr);
int32_t Crypto_Get_Security_Trailer_Length(SecurityAssociation_t *sa_ptr);

/*
** Internal Prototypes
*/
Expand Down
6 changes: 5 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,11 @@ if(DEFINED CFE_SYSTEM_PSPNAME)
set(CMAKE_INSTALL_RPATH "./${INSTALL_SUBDIR}")
add_cfe_app(crypto ${LIB_SRC_FILES})
target_include_directories(crypto PUBLIC ../include)
install(TARGETS crypto RUNTIME_DEPENDENCIES DESTINATION ${CMAKE_INSTALL_PREFIX}/${TGTSYS_${SYSVAR}}/${INSTALL_SUBDIR})
if(NOT CMAKE_CROSSCOMPILING)
install(TARGETS crypto RUNTIME_DEPENDENCIES DESTINATION ${CMAKE_INSTALL_PREFIX}/${TGTSYS_${SYSVAR}}/${INSTALL_SUBDIR})
else()
install(TARGETS crypto)
endif()
else()
# Standalone build
add_library(crypto SHARED ${LIB_SRC_FILES})
Expand Down
4 changes: 2 additions & 2 deletions src/core/crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -644,8 +644,8 @@ int32_t Crypto_SEC_MON_CTRL(uint8_t *ingest)
default:
#ifdef PDU_DEBUG
printf(KRED "Error: Crypto_PDU failed interpreting MC Procedure Identification Field! \n" RESET);
break;
#endif
break;
}
return status;
}
Expand Down Expand Up @@ -1277,7 +1277,7 @@ void Crypto_Set_FSR(uint8_t *p_ingest, uint16_t byte_idx, uint16_t pdu_len, Secu
}
}

uint32_t Crypto_Get_FSR()
uint32_t Crypto_Get_FSR(void)
{
uint32_t fsr;
fsr = (report.cwt << 31) | // bit(s) 1
Expand Down
2 changes: 1 addition & 1 deletion src/sa/internal/sa_interface_inmemory.template.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ SaInterface get_sa_interface_inmemory(void)
* @brief Function: sa_load_file
* Loads saved sa_file
**/
int32_t sa_load_file()
int32_t sa_load_file(void)
{
FILE *sa_save_file;
int32_t status = CRYPTO_LIB_SUCCESS;
Expand Down

0 comments on commit 14ee573

Please sign in to comment.