Skip to content

Commit

Permalink
fixed signature check
Browse files Browse the repository at this point in the history
  • Loading branch information
torresdal committed Mar 17, 2020
1 parent e18266c commit f2550fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/azure-keyvault-env/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ func verifyPKCS(signature string, plaintext string, pubkey rsa.PublicKey) bool {
sig, _ := base64.StdEncoding.DecodeString(signature)
hashed := sha256.Sum256([]byte(plaintext))
err := rsa.VerifyPKCS1v15(&pubkey, crypto.SHA256, hashed[:], sig)
return err != nil
return err == nil
}

func parseRsaPublicKey(pubPem string) (*rsa.PublicKey, error) {
Expand Down

0 comments on commit f2550fc

Please sign in to comment.