tls_codec: revert serde_bytes for VLBytes and add VLByteVec#2322
Conversation
boxdot
left a comment
There was a problem hiding this comment.
Thank you! This is a good change allowing to use the old building blocks and to use the new building blocks with the old data.
| feature = "serde", | ||
| serde(deserialize_with = "serde_compat::deserialize_vlbytes_compat") | ||
| )] | ||
| vec: Vec<u8>, |
There was a problem hiding this comment.
Nice simplification with serde(transparent).
| #[cfg(feature = "std")] | ||
| impl Zeroize for VLByteVec { | ||
| fn zeroize(&mut self) { | ||
| self.vec.zeroize(); | ||
| } | ||
| } |
There was a problem hiding this comment.
If I am not mistaken, Zeroize should be only implemented for VLSecretByteVec, right?
There was a problem hiding this comment.
Ah no. This just allows to zeroize the vec, but does not do it automatically on drop.
There was a problem hiding this comment.
yep, I'd like to get all the zeroization unified at some point though to make things simpler.
franziskuskiefer
left a comment
There was a problem hiding this comment.
Apologies for the delay. lgtm, let's get this in.
| #[cfg(feature = "std")] | ||
| impl Zeroize for VLByteVec { | ||
| fn zeroize(&mut self) { | ||
| self.vec.zeroize(); | ||
| } | ||
| } |
There was a problem hiding this comment.
yep, I'd like to get all the zeroization unified at some point though to make things simpler.
VLBytesandSecretVLBytesVLByteVecandSecretVLByteVecVLBytes