feat: validate key length

This commit is contained in:
Jahziel Villasana-Espinoza 2024-05-28 16:22:42 -04:00
parent 7b2c25270a
commit 55a4c783e9

View file

@ -508,6 +508,10 @@ the way that the Fleet server works.
cancel()
}
if len(config.Server.PrivateKey) > 0 && len([]byte(config.Server.PrivateKey)) != 32 {
initFatal(errors.New("private key must be 32 bytes long"), "validate private key")
}
appCfg, err := ds.AppConfig(context.Background())
if err != nil {
initFatal(err, "loading app config")