Skip to content

Commit

Permalink
Resolve PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
DakshitBabbar committed Dec 16, 2024
1 parent d5e011a commit 29fdd0b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

- [#1929](https://github.com/aws/aws-iot-device-sdk-embedded-C/pull/1929) This release brings the following changes:
- Includes [202406.01-LTS](https://github.com/FreeRTOS/FreeRTOS-LTS/releases/tag/202406.01-LTS) versions of coreMQTT, corePKCS11, coreHTTP, coreJSON, backoffAlgorithm, AWS IoT Device Shadow, AWS IoT Jobs, AWS IoT Device Defender, AWS IoT Fleet Provisioning and SigV4 libraries.
- Removes the OTA library and OTA demo . They are planned to be replaced by [aws-iot-core-mqtt-file-streams-embedded-c](https://github.com/aws/aws-iot-core-mqtt-file-streams-embedded-c) in future releases following [this announcement](https://aws.amazon.com/about-aws/whats-new/2023/12/freertos-modular-composable-ota-libraries/). To learn more about FreeRTOS OTA libraries, visit the [FreeRTOS OTA page](https://freertos.org/freertos-core/over-the-air-updates/index.html). To get started, see the new OTA [reference demo](https://freertos.org/freertos-core/over-the-air-updates/mqtt-ota-agent-orchestrator.html).
- Removes the OTA library and its associated demo.

NOTE: We recommend transitioning to the [new modular and composable OTA approach](https://freertos.org/Documentation/03-Libraries/07-Modular-over-the-air-updates/01-Over-the-air-updates) . To get started, see the new [OTA reference demo](https://github.com/FreeRTOS/Lab-Project-ota-example-for-AWS-IoT-Core?tab=readme-ov-file).
- Update readme instructions for demos for better user experience.

### Minor Changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -537,8 +537,8 @@ static CK_RV provisionPrivateKey( CK_SESSION_HANDLE session,
mbedtls_pk_type_t mbedKeyType = MBEDTLS_PK_NONE;
int mbedResult = 0;
mbedtls_pk_context mbedPkContext = { 0 };
mbedtls_ctr_drbg_context ctr_drbg;
mbedtls_entropy_context entropy;
mbedtls_ctr_drbg_context ctr_drbg = { 0 };
mbedtls_entropy_context entropy = { 0 };

mbedtls_pk_init( &mbedPkContext );
mbedtls_entropy_init( &entropy );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ static int extractEcPublicKey( CK_SESSION_HANDLE p11Session,
* @param[in] pHash Data to sign.
* @param[in] hashLen Length of #pHash.
* @param[out] pSig The signature
* @param[in] sig_size Unused
* @param[out] pSigLen The length of the signature.
* @param[in] pRng Unused.
* @param[in] pRngContext Unused.
Expand Down Expand Up @@ -637,8 +638,8 @@ static CK_RV provisionPrivateKey( CK_SESSION_HANDLE session,
mbedtls_pk_type_t mbedKeyType = MBEDTLS_PK_NONE;
int mbedResult = 0;
mbedtls_pk_context mbedPkContext = { 0 };
mbedtls_ctr_drbg_context ctr_drbg;
mbedtls_entropy_context entropy;
mbedtls_ctr_drbg_context ctr_drbg = { 0 };
mbedtls_entropy_context entropy = { 0 };

mbedtls_pk_init( &mbedPkContext );
mbedtls_entropy_init( &entropy );
Expand Down Expand Up @@ -916,7 +917,6 @@ static int32_t privateKeySigningCallback( mbedtls_pk_context * pContext,
int ( * pRng )( void *, unsigned char *, size_t ),
void * pRngContext )
{
( void ) sig_size;
CK_RV ret = CKR_OK;
int32_t result = 0;
CK_MECHANISM mech = { 0 };
Expand All @@ -929,6 +929,7 @@ static int32_t privateKeySigningCallback( mbedtls_pk_context * pContext,
( void ) ( pRng );
( void ) ( pRngContext );
( void ) ( mdAlg );
( void ) ( sig_size );

/* Sanity check buffer length. */
if( hashLen > sizeof( toBeSigned ) )
Expand Down
2 changes: 1 addition & 1 deletion platform/posix/transport/src/mbedtls_pkcs11_posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,6 @@ static int32_t privateKeySigningCallback( mbedtls_pk_context * pContext,
size_t ),
void * pRngContext )
{
( void ) sig_size;
CK_RV ret = CKR_OK;
int32_t result = 0;
MbedtlsPkcs11Context_t * pMbedtlsPkcs11Context = ( MbedtlsPkcs11Context_t * ) pContext->pk_ctx;
Expand All @@ -688,6 +687,7 @@ static int32_t privateKeySigningCallback( mbedtls_pk_context * pContext,
( void ) ( pRng );
( void ) ( pRngContext );
( void ) ( mdAlg );
( void ) ( sig_size );

assert( pContext != NULL );
assert( pHash != NULL );
Expand Down

0 comments on commit 29fdd0b

Please sign in to comment.