diff --git a/src/core/crypto/ecdsa.cpp b/src/core/crypto/ecdsa.cpp index f02a951df..eb8c78f19 100644 --- a/src/core/crypto/ecdsa.cpp +++ b/src/core/crypto/ecdsa.cpp @@ -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(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(aSize)); return 0; }