Skip to content

Commit

Permalink
Fixed nil deref
Browse files Browse the repository at this point in the history
  • Loading branch information
tlbdk committed Nov 14, 2019
1 parent 51de441 commit ba9f777
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ssh/kms.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ func (kmss *KMSSigner) Sign(rand io.Reader, digest []byte, opts crypto.SignerOpt

// Query the API.
res, err := kmss.client.AsymmetricSign(kmss.ctx, req)
return res.Signature, err
if err != nil {
return nil, err
}

return res.Signature, nil
}

// Public fetches public key
Expand Down

0 comments on commit ba9f777

Please sign in to comment.