]> Cypherpunks repositories - gostls13.git/commit
crypto/rsa: move PSS hash override above boring block
authorRoland Shoemaker <roland@golang.org>
Thu, 19 Sep 2024 16:20:56 +0000 (09:20 -0700)
committerRoland Shoemaker <roland@golang.org>
Wed, 25 Sep 2024 20:04:01 +0000 (20:04 +0000)
commit8ed18d2cefb91d3e1c6ffed8c465d369587e6ec5
tree4e0b1999ae4f33fa13725aae3dac93b025b282f9
parent49e542aa85b7c2d9f6cf50de00843b455bc1e635
crypto/rsa: move PSS hash override above boring block

The SignPSS hash override happened after the boringcrypto block, meaning
if a boringcrypto user passed a hash in the PSSOptions which did not
match the hash argument, it wouldn't be overriden. This change moves the
check above the boring block to make sure the override is honored.

Thanks to Quim Muntal of Microsoft for spotting this issue.

Change-Id: I05082a84ccb1863798ac6eae7a15cf4d1e59f12d
Reviewed-on: https://go-review.googlesource.com/c/go/+/614276
Reviewed-by: Quim Muntal <quimmuntal@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: David Chase <drchase@google.com>
src/crypto/rsa/pss.go
src/crypto/rsa/pss_test.go