Skip to content

[v0.8] Move self test logic to crate mbedtls-selftest #252

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

Closed
wants to merge 7 commits into from

Conversation

Taowyoo
Copy link
Collaborator

@Taowyoo Taowyoo commented Apr 19, 2023

mbedtls-selftest

This Rust crate is designed for separating self-test code that needs to export Rust
functions and define C functions to be used by C mbedtls. By separating this code,
different versions of Rust mbedtls crates can be used within a single crate, which
helps to solve link name conflict errors.

Note: Although multiple versions of Rust mbedtls crates can be used within a
single crate, only one mbedtls-selftest and one mbedtls-sys-auto crate can be
used since they are built as native libraries.

Changes need attention

bors bot and others added 3 commits April 18, 2023 17:08
180: Rearrange Send/Sync impls for MbedtlsList/MbedtlsBox r=AdrianCX a=jethrogb

See rust-lang/rust#93367

Co-authored-by: Jethro Beekman <[email protected]>
206: Fix CI r=Pagten a=raoulstrackx

A certificate used in CI expired and broke CI. This PR replaces the certificate.

There's also a return value of `std::boxed::Box::<T>::from_raw` that isn't used.

Co-authored-by: Raoul Strackx <[email protected]>
214: Add support for certificate revocation lists r=raoulstrackx a=monokles

Originally introduced by PR #112 but never made it into master.
I cherry-picked the original commits onto a fresh branch and fixed the resulting code.

Since it changes the API, the version number is bumped.

Co-authored-by: Raoul Strackx <[email protected]>
Co-authored-by: koentange <[email protected]>
@Taowyoo

This comment was marked as duplicate.

@Taowyoo
Copy link
Collaborator Author

Taowyoo commented Apr 19, 2023

bors try

@bors
Copy link
Contributor

bors bot commented Apr 19, 2023

try

Already running a review

@Taowyoo Taowyoo force-pushed the yx/selftest-crate-v0.8 branch from 9bdf743 to fa52ef8 Compare April 19, 2023 19:18
@Taowyoo
Copy link
Collaborator Author

Taowyoo commented Apr 19, 2023

bors try

@bors
Copy link
Contributor

bors bot commented Apr 19, 2023

try

Already running a review

@Taowyoo
Copy link
Collaborator Author

Taowyoo commented Apr 19, 2023

bors cancel

@jethrogb
Copy link
Member

Backport #243 as well?

@Taowyoo
Copy link
Collaborator Author

Taowyoo commented Apr 19, 2023

Backport #243 as well?

Oh, yes, it's also needed for 0.8.X

bors bot added a commit that referenced this pull request Apr 19, 2023
@Taowyoo
Copy link
Collaborator Author

Taowyoo commented Apr 19, 2023

bors cancel

@bors
Copy link
Contributor

bors bot commented Apr 19, 2023

try

Build succeeded:

  • continuous-integration/travis-ci/push

bors bot and others added 2 commits April 19, 2023 15:07
243: Namespace symbols for mbedtls_malloc to avoid conflicts. r=Taowyoo a=jethrogb

Dependents of this crate may use multiple different versions of this crate. These different versions all define mbedtls_calloc and mbedtls_free, which can result in linking conflicts. Since these functions are defined in and only used by this crate, we can namespace the symbols to avoid conflicts. We use Cargo's crate disambiguator for this purpose.

Co-authored-by: Jethro Beekman <[email protected]>
@Taowyoo Taowyoo force-pushed the yx/selftest-crate-v0.8 branch from fa52ef8 to baef46b Compare April 19, 2023 22:08
@Taowyoo
Copy link
Collaborator Author

Taowyoo commented Apr 19, 2023

bors try

bors bot added a commit that referenced this pull request Apr 19, 2023
@bors
Copy link
Contributor

bors bot commented Apr 19, 2023

try

Build failed:

@Taowyoo
Copy link
Collaborator Author

Taowyoo commented Apr 20, 2023

bors try

@Taowyoo
Copy link
Collaborator Author

Taowyoo commented Apr 20, 2023

bors cancel

bors bot added a commit that referenced this pull request Apr 20, 2023
@bors
Copy link
Contributor

bors bot commented Apr 20, 2023

try

Build failed:

Use `rustc_version` conditionally add `extended_key_value_attributes`
feature to fix problem: PR #243 code use unstable feature when compile
with nightly-2021-03-25 rustc.
@Taowyoo
Copy link
Collaborator Author

Taowyoo commented Apr 20, 2023

bors try

bors bot added a commit that referenced this pull request Apr 20, 2023
@bors
Copy link
Contributor

bors bot commented Apr 20, 2023

try

Build succeeded:

  • continuous-integration/travis-ci/push

@Taowyoo
Copy link
Collaborator Author

Taowyoo commented May 6, 2023

Close this PR, and continue work with remain in:

@Taowyoo Taowyoo closed this May 6, 2023
@Taowyoo Taowyoo deleted the yx/selftest-crate-v0.8 branch October 20, 2023 16:25
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.

Improve version management & avoid conflict between multiple version
3 participants