-
Notifications
You must be signed in to change notification settings - Fork 1
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
I did many, many changes. #27
Conversation
vach/src/loader/archive.rs
Outdated
// If there is an error the data is flagged as invalid | ||
if entry.signature.is_some() { | ||
if let Err(info) = pub_key.verify_strict(&buffer, &entry.signature.unwrap()) { | ||
eprintln!("{}", &info); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should probably not print to stdout, if we really want to print something we should use log, so that the user can filter it out if they want to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or just use regullar Err structs
vach/src/lib.rs
Outdated
@@ -15,7 +15,7 @@ pub(crate) mod writer; | |||
pub use rand; | |||
|
|||
/// Current file spec version, both `Loader` and `Builder` | |||
pub const VERSION: u16 = 13; | |||
pub const VERSION: u16 = 15; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the crate's version is now 0.1.6, shouldn't this be 16?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah!
Now
Builder
is more memory efficient at the cost that its generic type s now includeio::Seek
. The spec has changed, so the crate version changes. Now the space covered by signatures can be used for leaf data if the Archive does not use signatures. If you flip thehas_signatures
bit, you corrupt the data and the loader flags any data from the archive as insecure. Many more incremental changes