-
Notifications
You must be signed in to change notification settings - Fork 267
Signing 2 - hc keygen #974
Conversation
cli/src/cli/keygen.rs
Outdated
.unwrap(); | ||
|
||
let path = match directories::UserDirs::new() { | ||
Some(user_dirs) => user_dirs.home_dir().join(".holochain").join("keys"), |
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.
Based on what I added into the tree about directories, I propose that we create a new crate, or shareable file, that keeps track of and documents all the “magic strings” representing paths on devices. I find that they get scattered in the code and the act as high risk points of failure for our system I think. If we could start in that direction in this Pr that would be amazing
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.
Also I'm in favor of creating these directories with the XDG_CONFIG convention in mind. The directories
crate already does that for you, we just have to use it.
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.
Remarks aside, the unification of paths does look good
extern crate bip39; | ||
extern crate boolinator; | ||
extern crate rustc_serialize; |
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.
Why is this needed again?
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.
I don't know. I've just moved this by two lines for alphanumeric sorting.
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.
tests?
Also, this needs to be added to the readme of CLI, plus the mdbook. |
Co-Authored-By: lucksus <nicolas@lucksus.org>
Co-Authored-By: lucksus <nicolas@lucksus.org>
Ok, this is great I think, AND it takes us for now to a point where there is a |
Co-Authored-By: lucksus <nicolas@lucksus.org>
@sphinxc0re, ok to merge? |
@lucksus can you comment on #974 (comment)? |
@Connoropolous, yes, this only makes sense if we now switch all config path handling to |
hc keygen
asks for passhprase and writes encrypted key bundle file to~/.holochain/keys
.