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

zeroize: implement Zeroize for CString #650

Closed
tarcieri opened this issue Nov 5, 2021 · 1 comment
Closed

zeroize: implement Zeroize for CString #650

tarcieri opened this issue Nov 5, 2021 · 1 comment

Comments

@tarcieri
Copy link
Member

tarcieri commented Nov 5, 2021

Note: originally filed by @robinkrahl as iqlusioninc/crates#509

I have to store a password that will be passed to a C API using the Rust FFI. To avoid unnecessary copies, I store it as a std::ffi::CString. But as Zeroize is not implemented for CString, I can’t wrap this field in a Secret.

Could you please add a Zeroize implementation for CString?

robinhundt added a commit to robinhundt/utils that referenced this issue Apr 4, 2022
This implements Zeroize for std::ffi::CString. As CString is not in
allocate but in std, a new optional std feature is added to depend
on the std library.
robinhundt added a commit to robinhundt/utils that referenced this issue Apr 4, 2022
This implements Zeroize for std::ffi::CString. As CString is not in
allocate but in std, a new optional std feature is added to depend
on the std library.
@tarcieri
Copy link
Member Author

Added in #759

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant