Skip to content

Commit

Permalink
fix: Fixed some warnings from the linter
Browse files Browse the repository at this point in the history
Signed-off-by: Taras Drozdovskyi <[email protected]>
  • Loading branch information
tdrozdovsky committed May 3, 2024
1 parent 7317a93 commit d3575cb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
14 changes: 7 additions & 7 deletions tools/ecdsa_keygen.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ const uint32_t iv[] =
/* All data definitions with global scope appear here. */

/* Public Function Prototypes */
Message *message_init(int);
int aes256_init(Message *);
Message *aes256_encrypt(Message *);
void aes_cleanup(AES_DATA *);
void message_cleanup(Message *);
Message *message_init(int length);
int aes256_init(Message *input);
Message *aes256_encrypt(Message *plaintext);
void aes_cleanup(AES_DATA *aes_data);
void message_cleanup(Message *message);

void sha256(unsigned char *data, unsigned int data_len, unsigned char *hash)
{
Expand Down Expand Up @@ -125,8 +125,8 @@ int aes256_init(Message * input)

Message *aes256_encrypt(Message * plaintext)
{
EVP_CIPHER_CTX *enc_ctx;
Message * encrypted_message;
EVP_CIPHER_CTX *enc_ctx = NULL;
Message * encrypted_message = NULL;
int enc_length = *(plaintext->length)
+ (AES_BLOCK_SIZE - *(plaintext->length) % AES_BLOCK_SIZE);

Expand Down
5 changes: 3 additions & 2 deletions tools/fwinfogen.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@ static int sign_pFwInfo(FW_INFO_T *pFwInfo, ECC_KEY_T *ecdsa_key)
eckey) != 1) {
printf("Failed to verify EC Signature\n");
} else {
BIGNUM *r, *s;
BIGNUM *r = NULL;
BIGNUM *s = NULL;
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
ECDSA_SIG_get0(signature, &r, &s);
#else
Expand Down Expand Up @@ -333,7 +334,7 @@ int main(int argc, char** argv)
{
unsigned char *buf = NULL;
int ret = -1;
FILE* fd;
FILE* fd = NULL;
int img_size = 0;

#ifdef CONFIG_BOOTLOADER2
Expand Down

0 comments on commit d3575cb

Please sign in to comment.