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

Replace deprecated block-modes crate #69

Open
NotGyro opened this issue Dec 7, 2022 · 0 comments
Open

Replace deprecated block-modes crate #69

NotGyro opened this issue Dec 7, 2022 · 0 comments

Comments

@NotGyro
Copy link
Contributor

NotGyro commented Dec 7, 2022

As spotted in #35, block-modes is deprecated in favor of a collection of individual crates supporting each block mode. lib.rs, the only rust source file in block-modes in version 0.9.1, contains a comment stating //! This crate is deprecated. Use crates from https://github.com/RustCrypto/block-modes instead. and nothing else.

The reason this does not generate a compile error is that the only function we use block-modes in is decrypt_rc2(), which is under a feature-flag for pkcs12_rc2.

We'll need to replace our usages of the block-modes crate with cbc: https://crates.io/crates/cbc

The code which needs to be changed is here: https://github.com/mobilecoinfoundation/rust-mbedtls/blob/mc-develop/mbedtls/src/pkcs12/mod.rs#L605

It should be a simple one-line change, although the API may have changed somewhat.

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

No branches or pull requests

1 participant