Check that WorkerAuthKms is not nil before trying to decrypt with it (#2205)
This commit is contained in:
1 file changed
+3
@@ -84,6 +84,9 @@ func (c Controller) v1WorkerAuthConfig(protos []string) (*tls.Config, *base.Work
|
||||
if err := proto.Unmarshal(marshaledEncInfo, encInfo); err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
if isNil(c.conf.WorkerAuthKms) {
|
||||
return nil, nil, errors.New("worker auth kms not set")
|
||||
}
|
||||
marshaledInfo, err := c.conf.WorkerAuthKms.Decrypt(context.Background(), encInfo)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
|
||||
Reference in new issue
Block a user