Skip to content

fix: resolve type mismatch for mbed_tls_version return type#113

Merged
ivmarkov merged 1 commit intoesp-rs:mainfrom
inomotech-foss:fix/type-mismatch
Mar 8, 2026
Merged

fix: resolve type mismatch for mbed_tls_version return type#113
ivmarkov merged 1 commit intoesp-rs:mainfrom
inomotech-foss:fix/type-mismatch

Conversation

@scootermon
Copy link
Contributor

@scootermon scootermon commented Mar 7, 2026

The return type is currently hard-coded to u32, but the actual type of mbedtls_ssl_protocol_version is an enum, which is not necessarily 32 bits wide.

I discovered this issue thanks to the CI failure on esp-rs/openthread#64:
https://github.com/esp-rs/openthread/actions/runs/22805574122/job/66154038284

The return type is currently hard-coded to `u32`, but the actual
type of `mbedtls_ssl_protocol_version` is an enum, which is subject
to the `short-enum` pitfall.
@ivmarkov ivmarkov merged commit 1683991 into esp-rs:main Mar 8, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants