mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-02 20:16:15 -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
|
@ -7,6 +7,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
package cmd
|
||||
|
||||
import (
|
||||
"crypto/ed25519"
|
||||
"crypto/rand"
|
||||
"fmt"
|
||||
"os"
|
||||
|
@ -70,7 +71,7 @@ func runSSH(cmd *cobra.Command, _ []string) error {
|
|||
if err != nil {
|
||||
return fmt.Errorf("setting up KMS: %s", err)
|
||||
}
|
||||
key, err := kms.GetDEK(cmd.Context(), crypto.DEKPrefix+constants.SSHCAKeySuffix, 256)
|
||||
key, err := kms.GetDEK(cmd.Context(), crypto.DEKPrefix+constants.SSHCAKeySuffix, ed25519.SeedSize)
|
||||
if err != nil {
|
||||
return fmt.Errorf("retrieving key from KMS: %s", err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue