[#11] accounting: Implement signing service

Adds accounting Service implementation that verifiers request signatures and
signs responses from internal Service.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-08-22 17:17:03 +03:00 committed by Alex Vanin
parent 65eb1181e9
commit 5cf622881f
3 changed files with 58 additions and 3 deletions

View file

@ -2,7 +2,10 @@ package main
import (
"context"
"crypto/ecdsa"
"sync"
crypto "github.com/nspcc-dev/neofs-crypto"
)
type cfg struct {
@ -11,12 +14,18 @@ type cfg struct {
wg *sync.WaitGroup
grpcAddr string
key *ecdsa.PrivateKey
}
func defaultCfg() *cfg {
key, err := crypto.LoadPrivateKey("Kwk6k2eC3L3QuPvD8aiaNyoSXgQ2YL1bwS5CP1oKoA9waeAze97s")
fatalOnErr(err)
return &cfg{
ctx: context.Background(),
wg: new(sync.WaitGroup),
grpcAddr: "127.0.0.1:50501",
key: key,
}
}