mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-18 03:30:18 -04:00
added test for CA generation + use SeedSize constant
Previously, I just hard coded 256 as the key length that seeds the key generation since it worked. Now, it uses ed25519.SeedSize (32) instead.
This commit is contained in:
parent
0be301fa3a
commit
bee3f6c159
3 changed files with 38 additions and 2 deletions
|
@ -20,6 +20,7 @@ package initserver
|
|||
import (
|
||||
"bufio"
|
||||
"context"
|
||||
"crypto/ed25519"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
|
@ -225,7 +226,7 @@ func (s *Server) Init(req *initproto.InitRequest, stream initproto.API_InitServe
|
|||
}
|
||||
|
||||
// Derive the emergency ssh CA key
|
||||
key, err := cloudKms.GetDEK(stream.Context(), crypto.DEKPrefix+constants.SSHCAKeySuffix, 256)
|
||||
key, err := cloudKms.GetDEK(stream.Context(), crypto.DEKPrefix+constants.SSHCAKeySuffix, ed25519.SeedSize)
|
||||
if err != nil {
|
||||
if e := s.sendLogsWithMessage(stream, status.Errorf(codes.Internal, "retrieving DEK for key derivation: %s", err)); e != nil {
|
||||
err = errors.Join(err, e)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue