Skip to content

Commit

Permalink
#69 - Find and replace issue fixed with * *;
Browse files Browse the repository at this point in the history
  • Loading branch information
jlucas9 committed Feb 3, 2022
1 parent 7af1696 commit 332916c
Show file tree
Hide file tree
Showing 8 changed files with 103 additions and 103 deletions.
4 changes: 2 additions & 2 deletions include/crypto.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ extern int32_t Crypto_Shutdown(void); // Free all allocated memory

// Telecommand (TC)
extern int32_t Crypto_TC_ApplySecurity(const uint8_t* p_in_frame, const uint16_t in_frame_length,
uint8_t* *pp_enc_frame, uint16_t* p_enc_frame_len);
uint8_t** pp_enc_frame, uint16_t* p_enc_frame_len);
extern int32_t Crypto_TC_ProcessSecurity(uint8_t* ingest, int *len_ingest, TC_t* tc_sdls_processed_frame);
// Telemetry (TM)
extern int32_t Crypto_TM_ApplySecurity(uint8_t* ingest, int *len_ingest);
Expand Down Expand Up @@ -143,7 +143,7 @@ int32_t Crypto_PDU(uint8_t* ingest, TC_t* tc_frame);
// Managed Parameter Functions
int32_t Crypto_Get_Managed_Parameters_For_Gvcid(uint8_t tfvn, uint16_t scid, uint8_t vcid,
GvcidManagedParameters_t* managed_parameters_in,
GvcidManagedParameters_t* *managed_parameters_out);
GvcidManagedParameters_t** managed_parameters_out);
int32_t crypto_config_add_gvcid_managed_parameter_recursion(uint8_t tfvn, uint16_t scid, uint8_t vcid,
uint8_t has_fecf, uint8_t has_segmentation_hdr,
GvcidManagedParameters_t* managed_parameter);
Expand Down
4 changes: 2 additions & 2 deletions include/sadb_routine.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ typedef struct
int32_t (*sadb_init)(void);
int32_t (*sadb_close)(void);
// Security Association Interaction Functions
int32_t (*sadb_get_sa_from_spi)(uint16_t, SecurityAssociation_t* *);
int32_t (*sadb_get_operational_sa_from_gvcid)(uint8_t, uint16_t, uint16_t, uint8_t, SecurityAssociation_t* *);
int32_t (*sadb_get_sa_from_spi)(uint16_t, SecurityAssociation_t** );
int32_t (*sadb_get_operational_sa_from_gvcid)(uint8_t, uint16_t, uint16_t, uint8_t, SecurityAssociation_t**);
int32_t (*sadb_save_sa)(SecurityAssociation_t* );
// Security Association Utility Functions
int32_t (*sadb_sa_stop)(void);
Expand Down
4 changes: 2 additions & 2 deletions src/src_main/crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ int32_t Crypto_PDU(uint8_t* ingest, TC_t* tc_frame)
**/
int32_t Crypto_Get_Managed_Parameters_For_Gvcid(uint8_t tfvn, uint16_t scid, uint8_t vcid,
GvcidManagedParameters_t* managed_parameters_in,
GvcidManagedParameters_t* *managed_parameters_out)
GvcidManagedParameters_t** managed_parameters_out)
{
int32_t status = MANAGED_PARAMETERS_FOR_GVCID_NOT_FOUND;

Expand Down Expand Up @@ -664,7 +664,7 @@ void Crypto_Free_Managed_Parameters(GvcidManagedParameters_t* managed_parameters
* @param tc_sdls_processed_frame: TC_t*
* @param ingest: uint8_t*
* @note TODO - Actually update based on variable config
* */
**/
int32_t Crypto_Process_Extended_Procedure_Pdu(TC_t* tc_sdls_processed_frame, uint8_t* ingest)
{
int32_t status = CRYPTO_LIB_SUCCESS;
Expand Down
2 changes: 1 addition & 1 deletion src/src_main/crypto_tc.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* @param p_enc_frame_len: uint16
* @return int32: Success/Failure
**/
int32_t Crypto_TC_ApplySecurity(const uint8_t* p_in_frame, const uint16_t in_frame_length, uint8_t* *pp_in_frame,
int32_t Crypto_TC_ApplySecurity(const uint8_t* p_in_frame, const uint16_t in_frame_length, uint8_t** pp_in_frame,
uint16_t* p_enc_frame_len)
{
// Local Variables
Expand Down
8 changes: 4 additions & 4 deletions src/src_main/sadb_routine_inmemory.template.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ static int32_t sadb_config(void);
static int32_t sadb_init(void);
static int32_t sadb_close(void);
// Security Association Interaction Functions
static int32_t sadb_get_sa_from_spi(uint16_t, SecurityAssociation_t* *);
static int32_t sadb_get_operational_sa_from_gvcid(uint8_t, uint16_t, uint16_t, uint8_t, SecurityAssociation_t* *);
static int32_t sadb_get_sa_from_spi(uint16_t, SecurityAssociation_t**);
static int32_t sadb_get_operational_sa_from_gvcid(uint8_t, uint16_t, uint16_t, uint8_t, SecurityAssociation_t**);
static int32_t sadb_save_sa(SecurityAssociation_t* sa);
// Security Association Utility Functions
static int32_t sadb_sa_stop(void);
Expand Down Expand Up @@ -279,7 +279,7 @@ static int32_t sadb_close(void)
* @param security_association: SecurityAssociation_t**
* @return int32: Success/Failure
**/
static int32_t sadb_get_sa_from_spi(uint16_t spi, SecurityAssociation_t* *security_association)
static int32_t sadb_get_sa_from_spi(uint16_t spi, SecurityAssociation_t** security_association)
{
int32_t status = CRYPTO_LIB_SUCCESS;
if (sa == NULL)
Expand Down Expand Up @@ -312,7 +312,7 @@ static int32_t sadb_get_sa_from_spi(uint16_t spi, SecurityAssociation_t* *securi
* @return int32: Success/Failure
**/
static int32_t sadb_get_operational_sa_from_gvcid(uint8_t tfvn, uint16_t scid, uint16_t vcid, uint8_t mapid,
SecurityAssociation_t* *security_association)
SecurityAssociation_t** security_association)
{
int32_t status = CRYPTO_LIB_ERR_NO_OPERATIONAL_SA;
int i;
Expand Down
12 changes: 6 additions & 6 deletions src/src_mysql/sadb_routine_mariadb.template.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ static int32_t sadb_config(void);
static int32_t sadb_init(void);
static int32_t sadb_close(void);
// Security Association Interaction Functions
static int32_t sadb_get_sa_from_spi(uint16_t, SecurityAssociation_t* *);
static int32_t sadb_get_operational_sa_from_gvcid(uint8_t, uint16_t, uint16_t, uint8_t, SecurityAssociation_t* *);
static int32_t sadb_get_sa_from_spi(uint16_t, SecurityAssociation_t**);
static int32_t sadb_get_operational_sa_from_gvcid(uint8_t, uint16_t, uint16_t, uint8_t, SecurityAssociation_t**);
static int32_t sadb_save_sa(SecurityAssociation_t* sa);
// Security Association Utility Functions
static int32_t sadb_sa_stop(void);
Expand Down Expand Up @@ -60,7 +60,7 @@ static const char* SQL_SADB_UPDATE_IV_ARC_BY_SPI =
" WHERE spi='%d' AND tfvn='%d' AND scid='%d' AND vcid='%d' AND mapid='%d'";

// sadb_routine mariaDB private helper functions
static int32_t parse_sa_from_mysql_query(char* query, SecurityAssociation_t* *security_association);
static int32_t parse_sa_from_mysql_query(char* query, SecurityAssociation_t** security_association);
static int32_t convert_hexstring_to_byte_array(char* hexstr, uint8_t* byte_array);
static char* convert_byte_array_to_hexstring(void* src_buffer, size_t buffer_length);

Expand Down Expand Up @@ -172,7 +172,7 @@ static int32_t sadb_close(void)
}

// Security Association Interaction Functions
static int32_t sadb_get_sa_from_spi(uint16_t spi, SecurityAssociation_t* *security_association)
static int32_t sadb_get_sa_from_spi(uint16_t spi, SecurityAssociation_t** security_association)
{
int32_t status = CRYPTO_LIB_SUCCESS;

Expand All @@ -184,7 +184,7 @@ static int32_t sadb_get_sa_from_spi(uint16_t spi, SecurityAssociation_t* *securi
return status;
}
static int32_t sadb_get_operational_sa_from_gvcid(uint8_t tfvn, uint16_t scid, uint16_t vcid, uint8_t mapid,
SecurityAssociation_t* *security_association)
SecurityAssociation_t** security_association)
{
int32_t status = CRYPTO_LIB_SUCCESS;

Expand Down Expand Up @@ -272,7 +272,7 @@ static int32_t sadb_sa_delete(void)
}

// sadb_routine private helper functions
static int32_t parse_sa_from_mysql_query(char* query, SecurityAssociation_t* *security_association)
static int32_t parse_sa_from_mysql_query(char* query, SecurityAssociation_t** security_association)
{
int32_t status = CRYPTO_LIB_SUCCESS;
SecurityAssociation_t* sa = malloc(sizeof(SecurityAssociation_t));
Expand Down
2 changes: 1 addition & 1 deletion util/include/shared_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ extern "C"
void debug_printf(const char* format, ...);
void debug_hexprintf(const char* bin_data, int size_bin_data);

void hex_conversion(char* buffer_h, char* *buffer_b, int *buffer_b_length);
void hex_conversion(char* buffer_h, char** buffer_b, int *buffer_b_length);
int convert_hexstring_to_byte_array(char* source_str, char* dest_buffer);

#ifdef __cplusplus
Expand Down
Loading

0 comments on commit 332916c

Please sign in to comment.