Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix IAR enum conversion warnings when using mbedtls_md_type_t and mbedtls_cipher_type_t #7543

Draft
wants to merge 2 commits into
base: development
Choose a base branch
from

Conversation

silabs-Saketh
Copy link

Description

Use mbedtls_md_type_t and mbedtls_cipher_type_t data type when required, to avoid enum conversions. Warnings seen with IAR.

Gatekeeper checklist

  • changelog not required
  • backport not required
  • tests not required

Signed-off-by: Saketh Sunkishala <Saketh.Sunkishala@silabs.com>
Signed-off-by: Saketh Sunkishala <Saketh.Sunkishala@silabs.com>
@tom-cosgrove-arm tom-cosgrove-arm changed the title Fix enum conversion warnings when using mbedtls_md_type_t and mbedtls_cipher_type_t Fix IAR enum conversion warnings when using mbedtls_md_type_t and mbedtls_cipher_type_t May 3, 2023
Copy link
Contributor

@gilles-peskine-arm gilles-peskine-arm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, this approach is not feasible: it breaks the API.

@@ -379,7 +379,7 @@ typedef struct mbedtls_cipher_context_t {
* \return A statically-allocated array of cipher identifiers
* of type cipher_type_t. The last entry is zero.
*/
const int *mbedtls_cipher_list(void);
const mbedtls_cipher_type_t *mbedtls_cipher_list(void);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an incompatible change which we can't accept in a minor release. It breaks application code like

const int *array = mbedtls_cipher_list();

@gilles-peskine-arm gilles-peskine-arm added needs-work component-crypto Crypto primitives and low-level interfaces labels May 3, 2023
@tom-daubney-arm
Copy link
Contributor

We are now converting older PRs to draft PRs where the following conditions are met: They have not been updated in the last 3 months, and they need more than non-trivial work to complete.

@tom-daubney-arm tom-daubney-arm marked this pull request as draft August 4, 2023 12:27
@tom-daubney-arm tom-daubney-arm added the historical-reviewed Reviewed & agreed to keep legacy PR/issue label Aug 4, 2023
@daverodgman
Copy link
Contributor

@AgathiyanB are you aware of this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component-crypto Crypto primitives and low-level interfaces historical-reviewed Reviewed & agreed to keep legacy PR/issue needs-work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants