From 86e4ad65d11ca99a2d989260f7fc7f4608a49b7a Mon Sep 17 00:00:00 2001 From: Denis Mishin Date: Fri, 20 Oct 2023 15:14:20 -0400 Subject: [PATCH] zero: derive signing key first thing (#4631) --- internal/zero/bootstrap/new.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/zero/bootstrap/new.go b/internal/zero/bootstrap/new.go index 2bafb577d..0426a55f3 100644 --- a/internal/zero/bootstrap/new.go +++ b/internal/zero/bootstrap/new.go @@ -43,16 +43,16 @@ func New(secret []byte) (*Source, error) { rnd := hkdf.New(sha256.New, secret, nil, nil) - cipher, err := initCipher(rnd) - if err != nil { - return nil, fmt.Errorf("init cypher: %w", err) - } - err = initSecrets(cfg, rnd) if err != nil { return nil, fmt.Errorf("init secrets: %w", err) } + cipher, err := initCipher(rnd) + if err != nil { + return nil, fmt.Errorf("init cypher: %w", err) + } + svc := &Source{ source: source{ready: make(chan struct{})}, fileCipher: cipher,