Skip to content

Commit 01f39d8

Browse files
InverseIntegralMarcosDY
authored andcommitted
Prevent shadowing of variable (spiffe#5058)
Signed-off-by: Matteo Kamm <[email protected]>
1 parent 7c971cf commit 01f39d8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pkg/server/plugin/keymanager/hashicorpvault/vault_client.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -253,11 +253,12 @@ func (c *ClientConfig) configureTLS(vc *vapi.Config) error {
253253

254254
switch {
255255
case c.clientParams.ClientCertPath != "" && c.clientParams.ClientKeyPath != "":
256-
c, err := tls.LoadX509KeyPair(c.clientParams.ClientCertPath, c.clientParams.ClientKeyPath)
256+
var err error
257+
258+
clientCert, err = tls.LoadX509KeyPair(c.clientParams.ClientCertPath, c.clientParams.ClientKeyPath)
257259
if err != nil {
258260
return status.Errorf(codes.InvalidArgument, "failed to parse client cert and private-key: %v", err)
259261
}
260-
clientCert = c
261262
foundClientCert = true
262263
case c.clientParams.ClientCertPath != "" || c.clientParams.ClientKeyPath != "":
263264
return status.Error(codes.InvalidArgument, "both client cert and client key are required")

0 commit comments

Comments
 (0)