|  | Commit message (Collapse) | Author | Age | 
|---|
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | The rand crate comes with a slew of dependencies to cover all sort of
randomness related tasks in various scenarios. However, this crate
really only requires a tiny subset of this functionality. As it turns
out, this core functionality is provided by the rand_os crate.
This change drops the dependency to rand in favor of rand_os. In order
to accomplish that, it brings back the RngError variant for the
CommandError enum to capture the possibility of the creation of the
random number generator failing. | 
| | 
| 
| 
| 
| | We switched to rand::thread_rng() which cannot fail.  Therefore the
CommandError::RngError is no longer needed and removed in this patch. | 
| | |  | 
| | 
| 
| 
| 
| 
| | This patch changes use declarations for modules within this crate to use
the crate:: path qualifier.  This will be mandatory in Rust edition
2018. | 
| | 
| 
| 
| 
| | Most notably, for command errors, this will print a human-readable error
message instead of just the name of the enum. | 
| | 
| 
| 
| 
| 
| | The new get_cstring method in util returns a Result<CString,
CommandError>, so mast callers can just use the ? operator to unwrap the
result instead of cumbersome unwrapping code. | 
| | 
| 
| 
| 
| 
| | The Result enum is more idiomatic and easier to use than our custom
CommandStatus enum with the same structure.  This is especially true for
the try operator ?. | 
| | |  | 
| | 
| 
| 
| 
| 
| | Previously, the Authenticate implementation for DeviceWrapper paniced if
the wrapped device is a Nitrokey Storage.  This patch implements
authentication for wrapped Storage devices. | 
| | 
| 
| 
| 
| | This patch adds the Storage struct and the test-storage feature.  It
also enables all currently supported Pro commands for the Storage. | 
|  |  |