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

make the default repo for corebuilder work #1317

Merged
merged 1 commit into from
Jun 3, 2015
Merged

Conversation

whyrusleeping
Copy link
Member

I was trying to build an app using an ipfs node, and the NodeBuilder panics if you dont specify a repo because the default repo setting doesnt provide a peerID and private key. So i added that generation logic into this.

@whyrusleeping whyrusleeping added the status/in-progress In progress label Jun 1, 2015
func defaultRepo() repo.Repo {
func defaultRepo() (repo.Repo, error) {
c := cfg.Config{}
priv, pub, err := ci.GenerateKeyPairWithReader(ci.RSA, 1024, u.NewTimeSeededRand())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not secure. why not use crypto.Rand ? 1024 is not very slow. (unless you're doing it tons)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, i guess thats true.

@whyrusleeping
Copy link
Member Author

alright, updated.

@jbenet
Copy link
Member

jbenet commented Jun 3, 2015

@whyrusleeping travis fails to build. rebase?

jbenet added a commit that referenced this pull request Jun 3, 2015
make the default repo for corebuilder work
@jbenet jbenet merged commit 13cd226 into master Jun 3, 2015
@jbenet jbenet removed the status/in-progress In progress label Jun 3, 2015
@jbenet jbenet deleted the builder-default branch June 3, 2015 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants