diff --git a/cmd/api/main.go b/cmd/api/main.go index 703e6b8..8e5cb19 100644 --- a/cmd/api/main.go +++ b/cmd/api/main.go @@ -1,6 +1,8 @@ package main import ( + "crypto/rand" + "crypto/rsa" "log" "net/rpc" @@ -13,9 +15,14 @@ func main() { log.Fatal(err) } + pKey, err := rsa.GenerateKey(rand.Reader, 1024) + if err != nil { + log.Fatal(err) + } + req := routerpc.AddHostRequest{ APIKey: "hunter2", - PrivKey: nil, + PrivKey: pKey, } resp := &routerpc.AddHostResponse{}