Skip to content

Add More try_compile Feature Probes #3327

Open
@maddeleine

Description

@maddeleine

Security issue notifications

If you discover a potential security issue in s2n we ask that you notify
AWS Security via our vulnerability reporting page. Please do not create a public github issue.

Problem:

We should attempt to turn all of our weird libcrypto version-checking logic into try_compile/feature probes. It makes our code much cleaner and easier to read. To do this we have to create a file in our tests/features folder that attempts to use a specific header or calls a specific function, and add a try_compile for that feature in both our CMakeLists.txt file and s2n.mk file.

Example of our feature probe for evp_md5_sha1: #3128

CMakeLists.txt
s2n.mk
feature probe file
Ideally we would also write a feature_probe unit test checking that if we are using a specific platform/libcrypto version/etc... this feature variable will be turned on. This lets us double check that our features are actually getting turned on.

Very incomplete list of features that probably can be try_compiled

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions