ocicrypt-rs drop unused env::set_var() - #1653
Conversation
Xynnn007
left a comment
There was a problem hiding this comment.
I get the point that you want to get rid of set_var for unsafe reasons.
This PR mainly changes the unit tests, and the from_env is a basic routine that ocicrypt(-rs) should support.
It's ok to keep them as-is in unit test codes as they will not be compiled into binary. We can remove set_var parts in real logic. For this PR, you can add from_file test cases to UT which is missed in current codebase.
It is true that the PR is triggered by the 2024 edition change. If you read the commit message you notice 003e8ef removes dead code so why not to do the cleanup?
I believe his is covered by e9f86f1. |
test_encrypt_decrypt_layer and test_async_decrypt_layer set OCICRYPT_KEYPROVIDER_CONFIG before running, but test_conf_path was never actually used: both tests only exercise the jwe key wrapper (via encrypt_with_jwe / decrypt_with_priv_keys), which is registered unconditionally and has nothing to do with this env var. The provider.* wrapper it configures is never invoked, since neither test calls encrypt_with_key_provider / decrypt_with_key_provider. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
e9f86f1 to
509922f
Compare
|
Your comment on the other commit is fair so I just dropped it. |
|
Thanks for adopting points! |
No description provided.