Skip to content
Open
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
12 changes: 12 additions & 0 deletions drivers/crypto/pnt/pnt_se05x_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,20 @@

struct pnt_handle
{
Se05xSession_t session;

Check failure on line 52 in drivers/crypto/pnt/pnt_se05x_api.c

View workflow job for this annotation

GitHub Actions / check

Mixed case identifier found
};

/****************************************************************************
* Private Data
****************************************************************************/

static const SE05x_ECSignatureAlgo_t

Check failure on line 59 in drivers/crypto/pnt/pnt_se05x_api.c

View workflow job for this annotation

GitHub Actions / check

Mixed case identifier found
signature_algorithm_mapping[SE05X_ALGORITHM_SIZE] =
{
kSE05x_ECSignatureAlgo_NA, kSE05x_ECSignatureAlgo_PLAIN,

Check failure on line 62 in drivers/crypto/pnt/pnt_se05x_api.c

View workflow job for this annotation

GitHub Actions / check

Mixed case identifier found

Check failure on line 62 in drivers/crypto/pnt/pnt_se05x_api.c

View workflow job for this annotation

GitHub Actions / check

Mixed case identifier found
kSE05x_ECSignatureAlgo_SHA, kSE05x_ECSignatureAlgo_SHA_224,

Check failure on line 63 in drivers/crypto/pnt/pnt_se05x_api.c

View workflow job for this annotation

GitHub Actions / check

Mixed case identifier found

Check failure on line 63 in drivers/crypto/pnt/pnt_se05x_api.c

View workflow job for this annotation

GitHub Actions / check

Mixed case identifier found
kSE05x_ECSignatureAlgo_SHA_256, kSE05x_ECSignatureAlgo_SHA_384,

Check failure on line 64 in drivers/crypto/pnt/pnt_se05x_api.c

View workflow job for this annotation

GitHub Actions / check

Mixed case identifier found

Check failure on line 64 in drivers/crypto/pnt/pnt_se05x_api.c

View workflow job for this annotation

GitHub Actions / check

Mixed case identifier found
kSE05x_ECSignatureAlgo_SHA_512

Check failure on line 65 in drivers/crypto/pnt/pnt_se05x_api.c

View workflow job for this annotation

GitHub Actions / check

Mixed case identifier found
};

static const uint8_t scp03_enc_key[SCP03_KEY_SIZE] = SCP03_ENC_KEY;
Expand Down Expand Up @@ -102,7 +102,7 @@
goto errout;
}

memset(&(se05x->pnt->session), 0, sizeof(Se05xSession_t));

Check failure on line 105 in drivers/crypto/pnt/pnt_se05x_api.c

View workflow job for this annotation

GitHub Actions / check

Mixed case identifier found

se05x->pnt->session.pScp03_enc_key = (FAR uint8_t *)scp03_enc_key;
se05x->pnt->session.pScp03_mac_key = (FAR uint8_t *)scp03_mac_key;
Expand Down Expand Up @@ -308,6 +308,12 @@
{
create_signature_args->signature.buffer_content_size =
create_signature_args->signature.buffer_size;

if (create_signature_args->algorithm >= SE05X_ALGORITHM_SIZE)
{
return -EINVAL;
}

int result =
Se05x_API_ECDSASign(
&(se05x->pnt->session), create_signature_args->key_id,
Expand All @@ -327,6 +333,12 @@
FAR struct se05x_signature_s *verify_signature_args)
{
SE05x_Result_t se05x_result;

if (verify_signature_args->algorithm >= SE05X_ALGORITHM_SIZE)
{
return -EINVAL;
}

int result =
Se05x_API_ECDSAVerify(
&(se05x->pnt->session), verify_signature_args->key_id,
Expand Down
Loading