Skip to content

[BUG] mbedtls "alt" functions return errors in a wrong way #3142

Description

@yamt

Description / Steps to reproduce the issue

our mbedtls alt functions (eg.

int mbedtls_sha1_update(FAR mbedtls_sha1_context *ctx,
FAR const unsigned char *input,
size_t ilen)
{
ctx->crypt.op = COP_ENCRYPT;
ctx->crypt.flags |= COP_FLAG_UPDATE;
ctx->crypt.src = (caddr_t)input;
ctx->crypt.len = ilen;
return cryptodev_crypt(ctx);
}
)
return negative nuttx errno, while they should return mbedtls error code like MBEDTLS_ERR_SHA1_BAD_INPUT_DATA.

On which OS does this issue occur?

[OS: Mac]

What is the version of your OS?

macOS 15.5

NuttX Version

master

Issue Architecture

[Arch: xtensa]

Issue Area

[Area: Crypto]

Host information

No response

Verification

  • I have verified before submitting the report.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions