Skip to content

Forced "time" feature on windows causes unexpected behaviour #380

Open
@exFalso

Description

@exFalso

In one of our projects we use mbedtls with time support explicitly switched off. (Context: we are deliberately verifying x509 certificates which have expired validity)

We use this project to produce python packages for various platforms, including windows. We were surprised to find that time validity checks kept failing on windows even though the feature was switched off, and it took some time to track it down to these mysterious lines:

# feature 'time` is necessary under windows
[target.'cfg(target_env = "msvc")'.dependencies]
mbedtls-platform-support = { version = "0.1", path = "../mbedtls-platform-support", features = [
"time",
] }

We worked around this with an internal fork, but we wonder why these lines are there in the first place? mbedtls seems to build fine with MBEDTLS_HAVE_TIME + MBEDTLS_HAVE_TIME_DATE undefined?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions