mirror of
https://github.com/espressif/openthread.git
synced 2026-09-08 02:00:12 +00:00
[ecdsa] fix -Wimplicit-int-conversion warnings (#3382)
This commit is contained in:
@@ -82,7 +82,7 @@ otError Ecdsa::Sign(uint8_t * aOutput,
|
||||
|
||||
// Concatenate the two octet sequences in the order R and then S.
|
||||
VerifyOrExit(mbedtls_mpi_write_binary(&rMpi, aOutput, mbedtls_mpi_size(&rMpi)) == 0, error = OT_ERROR_FAILED);
|
||||
*aOutputLength = mbedtls_mpi_size(&rMpi);
|
||||
*aOutputLength = static_cast<uint16_t>(mbedtls_mpi_size(&rMpi));
|
||||
|
||||
VerifyOrExit(mbedtls_mpi_write_binary(&sMpi, aOutput + *aOutputLength, mbedtls_mpi_size(&sMpi)) == 0,
|
||||
error = OT_ERROR_FAILED);
|
||||
@@ -99,7 +99,7 @@ exit:
|
||||
|
||||
int Ecdsa::FillRandom(void *, unsigned char *aBuffer, size_t aSize)
|
||||
{
|
||||
Random::FillBuffer(aBuffer, aSize);
|
||||
Random::FillBuffer(aBuffer, static_cast<uint16_t>(aSize));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user