Skip to content

Commit a3e9578

Browse files
committed
feat: validate key
Signed-off-by: chohee <cc5281@126.com>
1 parent 67253ff commit a3e9578

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

manager/config/config.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,11 @@ func (cfg *Config) Validate() error {
724724
}
725725
}
726726

727-
// TODO: validate key
727+
if cfg.Encryption.Enable {
728+
if cfg.Encryption.Key == nil {
729+
return errors.New("encryption requires parameter key")
730+
}
731+
}
728732

729733
return nil
730734
}

0 commit comments

Comments
 (0)