Skip to content

Commit

Permalink
openpgp/clearsign: just use rand.Reader in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mdosch authored and lubux committed Feb 27, 2025
1 parent cfbd6f6 commit 2b2dbe9
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions openpgp/clearsign/clearsign_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,24 +171,12 @@ func TestSigningInterop(t *testing.T) {
}
}

// We use this to make test keys, so that they aren't all the same.
type quickRand byte

func (qr *quickRand) Read(p []byte) (int, error) {
for i := range p {
p[i] = byte(*qr)
}
*qr++
return len(p), nil
}

func testMultiSign(t *testing.T, v6 bool) {
if testing.Short() {
t.Skip("skipping long test in -short mode")
}

zero := quickRand(0)
config := packet.Config{Rand: &zero, V6Keys: v6}
config := packet.Config{V6Keys: v6}

for nKeys := 1; nKeys < 4; nKeys++ {
nextTest:
Expand Down

0 comments on commit 2b2dbe9

Please sign in to comment.