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

HOTFIX Node creates identity on each run #75

Merged
merged 18 commits into from Jan 3, 2018

Conversation

Projects
None yet
5 participants
@Waldz
Copy link
Member

commented Dec 28, 2017

No description provided.

@Waldz Waldz force-pushed the hotfix/identity-loop branch from e8e42ca to 8b0b378 Dec 28, 2017


func (ih *identityHandler) launchNew() (id identity.Identity, err error) {
// if all fails, create a new one
id, err = ih.manager.CreateNewIdentity("")

This comment has been minimized.

Copy link
@shroomist

shroomist Dec 28, 2017

Contributor

Perhaps it's not the best place to hardcode default empty passphrase.
maybe a getter function, to take it from config, context or elsewhere?

This comment has been minimized.

Copy link
@Waldz

Waldz Jan 2, 2018

Author Member

Moved to constant nodeIdentityPassword

sessionManagerFactory: func(vpnServerIp string) session.ManagerInterface {
return openvpn_session.NewManager(openvpn.NewClientConfig(
vpnServerIp,
options.DirectoryConfig+"/ca.crt",

This comment has been minimized.

Copy link
@tadovas

tadovas Dec 29, 2017

Member

Don't hardcode slashes - the code is not portable between OSes. https://golang.org/pkg/path/filepath/#Join is your friend here.

This comment has been minimized.

Copy link
@Waldz

Waldz Jan 2, 2018

Author Member

Fixed in all codebase

return ih.launchNew()
}

func (ih *identityHandler) launchExisting(address string) (id identity.Identity, err error) {

This comment has been minimized.

Copy link
@ignasbernotas

ignasbernotas Jan 2, 2018

Member

Launch sounds strange. I'd prefer "use" instead:)

This comment has been minimized.

Copy link
@Waldz

Waldz Jan 2, 2018

Author Member

Fixed

@ignasbernotas
Copy link
Member

left a comment

LGTM

@Waldz Waldz dismissed stale reviews from ignasbernotas, zolia, and shroomist via b76ff63 Jan 2, 2018

@Waldz Waldz force-pushed the hotfix/identity-loop branch from 8b0b378 to b76ff63 Jan 2, 2018

@Waldz Waldz force-pushed the hotfix/identity-loop branch from b76ff63 to 4a0c84c Jan 2, 2018

@Waldz

This comment has been minimized.

Copy link
Member Author

commented Jan 2, 2018

Fixes made, @tadovas, please check

@tadovas

tadovas approved these changes Jan 3, 2018

Copy link
Member

left a comment

LGTM

@Waldz Waldz merged commit 9333938 into master Jan 3, 2018

@Waldz Waldz deleted the hotfix/identity-loop branch Jan 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.