mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-20 13:24:09 -07:00
More plumbing
This commit is contained in:
parent
d1b780c7be
commit
b9911d0db7
18 changed files with 384 additions and 114 deletions
|
@ -29,18 +29,9 @@ func locatorNew(args []string) {
|
|||
os.Exit(1)
|
||||
}
|
||||
|
||||
identityData, err := ioutil.ReadFile(args[0])
|
||||
if err != nil {
|
||||
fmt.Printf("FATAL: unable to read identity: %s\n", err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
identity, err := zerotier.NewIdentityFromString(string(identityData))
|
||||
if err != nil {
|
||||
fmt.Printf("FATAL: invalid identity: %s\n", err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
identity := readIdentity(args[0])
|
||||
if !identity.HasPrivate() {
|
||||
fmt.Println("FATAL: identity does not contain secret key")
|
||||
fmt.Println("FATAL: identity does not contain a secret key (required to sign locator)")
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue