Closed say-yawn closed 1 month ago
As part of initializing the contentsignature signer we call conf.GetRand(). This will be either a rand.Reader or crypto11.PKCSRandReader depending on whether or not an HSM is available. However, the SignHash method ends up just using rand.Reader directly, and s.rand goes unused altogether.
Make sure SignHash uses the same rand as the initialized ContentSigner by using s.rand.
SignHash
ContentSigner
s.rand
Fix AUT-251
Decided to merge this without tests because the ContentSignature is only used for integration testing.
ContentSignature
As part of initializing the contentsignature signer we call conf.GetRand(). This will be either a rand.Reader or crypto11.PKCSRandReader depending on whether or not an HSM is available. However, the SignHash method ends up just using rand.Reader directly, and s.rand goes unused altogether.
Make sure
SignHash
uses the same rand as the initializedContentSigner
by usings.rand
.Fix AUT-251