Skip to content

Commit dbca4d5

Browse files
committed
remove unused crypto/rand imports
1 parent 83a2e17 commit dbca4d5

6 files changed

Lines changed: 411 additions & 4 deletions

File tree

goodkey/good_key_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"context"
55
"crypto/ecdsa"
66
"crypto/elliptic"
7-
"crypto/rand"
87
"crypto/rsa"
98
"fmt"
109
"math/big"

goodkey/sagoodkey/good_key_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"context"
55
"crypto/ecdsa"
66
"crypto/elliptic"
7-
"crypto/rand"
87
"testing"
98

109
"google.golang.org/grpc"

pkcs11helpers/helpers_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ func TestX509Signer(t *testing.T) {
275275
digest := sha256.Sum256([]byte("hello"))
276276
s := &Session{ctx, 0}
277277
signer := &x509Signer{session: s, keyType: ECDSAKey, pub: tk.Public()}
278-
signature, err := signer.Sign(nil, digest[:], crypto.SHA256)
278+
signature, err := signer.Sign(rand.Reader, digest[:], crypto.SHA256)
279279
test.AssertNotError(t, err, "x509Signer.Sign failed")
280280

281281
var rfcFormat struct {

privatekey/privatekey_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package privatekey
33
import (
44
"crypto/ecdsa"
55
"crypto/elliptic"
6-
"crypto/rand"
76
"crypto/rsa"
87
"testing"
98

test_output.txt

Lines changed: 208 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,208 @@
1+
ok github.com/letsencrypt/boulder/allowlist (cached)
2+
# github.com/letsencrypt/boulder/blog
3+
blog\logger.go:61:28: undefined: syslog.Dial
4+
blog\logger.go:61:48: undefined: syslog.LOG_INFO
5+
# github.com/letsencrypt/pkcs11key/v4
6+
vendor\github.com\letsencrypt\pkcs11key\v4\key.go:70:25: undefined: pkcs11.SessionHandle
7+
vendor\github.com\letsencrypt\pkcs11key\v4\key.go:71:29: undefined: pkcs11.SessionHandle
8+
vendor\github.com\letsencrypt\pkcs11key\v4\key.go:72:28: undefined: pkcs11.SessionHandle
9+
vendor\github.com\letsencrypt\pkcs11key\v4\key.go:72:58: undefined: pkcs11.Attribute
10+
vendor\github.com\letsencrypt\pkcs11key\v4\key.go:73:24: undefined: pkcs11.SessionHandle
11+
vendor\github.com\letsencrypt\pkcs11key\v4\key.go:73:58: undefined: pkcs11.ObjectHandle
12+
vendor\github.com\letsencrypt\pkcs11key\v4\key.go:74:30: undefined: pkcs11.SessionHandle
13+
vendor\github.com\letsencrypt\pkcs11key\v4\key.go:74:54: undefined: pkcs11.ObjectHandle
14+
vendor\github.com\letsencrypt\pkcs11key\v4\key.go:74:80: undefined: pkcs11.Attribute
15+
vendor\github.com\letsencrypt\pkcs11key\v4\key.go:76:36: undefined: pkcs11.TokenInfo
16+
vendor\github.com\letsencrypt\pkcs11key\v4\key.go:76:36: too many errors
17+
# github.com/zmap/zcrypto/x509
18+
vendor\github.com\zmap\zcrypto\x509\root.go:27:32: undefined: loadSystemRoots
19+
# github.com/letsencrypt/boulder/pkcs11helpers
20+
pkcs11helpers\helpers.go:18:25: undefined: pkcs11.SessionHandle
21+
pkcs11helpers\helpers.go:18:50: undefined: pkcs11.Mechanism
22+
pkcs11helpers\helpers.go:18:71: undefined: pkcs11.Attribute
23+
pkcs11helpers\helpers.go:18:111: undefined: pkcs11.ObjectHandle
24+
pkcs11helpers\helpers.go:19:27: undefined: pkcs11.SessionHandle
25+
pkcs11helpers\helpers.go:19:49: undefined: pkcs11.ObjectHandle
26+
pkcs11helpers\helpers.go:19:73: undefined: pkcs11.Attribute
27+
pkcs11helpers\helpers.go:20:18: undefined: pkcs11.SessionHandle
28+
pkcs11helpers\helpers.go:20:43: undefined: pkcs11.Mechanism
29+
pkcs11helpers\helpers.go:20:61: undefined: pkcs11.ObjectHandle
30+
pkcs11helpers\helpers.go:20:61: too many errors
31+
# github.com/letsencrypt/boulder/goodkey [github.com/letsencrypt/boulder/goodkey.test]
32+
goodkey\good_key_test.go:7:2: "crypto/rand" imported and not used
33+
# github.com/letsencrypt/boulder/goodkey/sagoodkey [github.com/letsencrypt/boulder/goodkey/sagoodkey.test]
34+
goodkey\sagoodkey\good_key_test.go:7:2: "crypto/rand" imported and not used
35+
# github.com/letsencrypt/boulder/privatekey [github.com/letsencrypt/boulder/privatekey.test]
36+
privatekey\privatekey_test.go:6:2: "crypto/rand" imported and not used
37+
FAIL github.com/letsencrypt/boulder/bdns [build failed]
38+
FAIL github.com/letsencrypt/boulder/blog [build failed]
39+
FAIL github.com/letsencrypt/boulder/blog/validator [build failed]
40+
FAIL github.com/letsencrypt/boulder/ca [build failed]
41+
? github.com/letsencrypt/boulder/ca/proto [no test files]
42+
FAIL github.com/letsencrypt/boulder/cmd [build failed]
43+
FAIL github.com/letsencrypt/boulder/cmd/admin [build failed]
44+
FAIL github.com/letsencrypt/boulder/cmd/bad-key-revoker [build failed]
45+
FAIL github.com/letsencrypt/boulder/cmd/boulder [build failed]
46+
FAIL github.com/letsencrypt/boulder/cmd/boulder-ca [build failed]
47+
FAIL github.com/letsencrypt/boulder/cmd/boulder-mtpublisher [build failed]
48+
FAIL github.com/letsencrypt/boulder/cmd/boulder-observer [build failed]
49+
FAIL github.com/letsencrypt/boulder/cmd/boulder-publisher [build failed]
50+
FAIL github.com/letsencrypt/boulder/cmd/boulder-ra [build failed]
51+
FAIL github.com/letsencrypt/boulder/cmd/boulder-sa [build failed]
52+
FAIL github.com/letsencrypt/boulder/cmd/boulder-va [build failed]
53+
FAIL github.com/letsencrypt/boulder/cmd/boulder-wfe2 [build failed]
54+
FAIL github.com/letsencrypt/boulder/cmd/ceremony [build failed]
55+
FAIL github.com/letsencrypt/boulder/cmd/cert-checker [build failed]
56+
FAIL github.com/letsencrypt/boulder/cmd/crl-checker [build failed]
57+
FAIL github.com/letsencrypt/boulder/cmd/crl-storer [build failed]
58+
FAIL github.com/letsencrypt/boulder/cmd/crl-updater [build failed]
59+
FAIL github.com/letsencrypt/boulder/cmd/email-exporter [build failed]
60+
FAIL github.com/letsencrypt/boulder/cmd/log-validator [build failed]
61+
FAIL github.com/letsencrypt/boulder/cmd/nonce-service [build failed]
62+
FAIL github.com/letsencrypt/boulder/cmd/remoteva [build failed]
63+
FAIL github.com/letsencrypt/boulder/cmd/reversed-hostname-checker [build failed]
64+
FAIL github.com/letsencrypt/boulder/cmd/sfe [build failed]
65+
? github.com/letsencrypt/boulder/config [no test files]
66+
ok github.com/letsencrypt/boulder/core (cached)
67+
? github.com/letsencrypt/boulder/core/proto [no test files]
68+
FAIL github.com/letsencrypt/boulder/crl [build failed]
69+
FAIL github.com/letsencrypt/boulder/crl/checker [build failed]
70+
ok github.com/letsencrypt/boulder/crl/idp (cached)
71+
FAIL github.com/letsencrypt/boulder/crl/storer [build failed]
72+
? github.com/letsencrypt/boulder/crl/storer/proto [no test files]
73+
FAIL github.com/letsencrypt/boulder/crl/updater [build failed]
74+
ok github.com/letsencrypt/boulder/csr 1.178s
75+
FAIL github.com/letsencrypt/boulder/ctpolicy [build failed]
76+
? github.com/letsencrypt/boulder/ctpolicy/ctconfig [no test files]
77+
ok github.com/letsencrypt/boulder/ctpolicy/loglist (cached)
78+
--- FAIL: TestWrappedMap (0.01s)
79+
map_test.go:299: unexpected error beginning transaction: failed to begin transaction: dial tcp: lookup unset DB_ADDR: no such host
80+
panic: runtime error: invalid memory address or nil pointer dereference [recovered, repanicked]
81+
[signal 0xc0000005 code=0x0 addr=0x10 pc=0x7ff773d65824]
82+
83+
goroutine 47 [running]:
84+
testing.tRunner.func1.2({0x7ff77409eb60, 0x7ff7745f6110})
85+
C:/Program Files/Go/src/testing/testing.go:1974 +0x239
86+
testing.tRunner.func1()
87+
C:/Program Files/Go/src/testing/testing.go:1977 +0x349
88+
panic({0x7ff77409eb60?, 0x7ff7745f6110?})
89+
C:/Program Files/Go/src/runtime/panic.go:860 +0x13a
90+
github.com/letsencrypt/borp.(*Transaction).Rollback(0x151b0e7503c0?)
91+
C:/Users/mahin/Desktop/VS Projects/boulder/boulder/vendor/github.com/letsencrypt/borp/transaction.go:194 +0x24
92+
github.com/letsencrypt/boulder/db.TestWrappedMap.func3()
93+
C:/Users/mahin/Desktop/VS Projects/boulder/boulder/db/map_test.go:298 +0x1c
94+
runtime.Goexit()
95+
C:/Program Files/Go/src/runtime/panic.go:694 +0x5e
96+
testing.(*common).FailNow(0x151b0e782000)
97+
C:/Program Files/Go/src/testing/testing.go:1022 +0x4a
98+
testing.(*common).Fatalf(0x151b0e782000, {0x7ff77413cc0d?, 0x7ff7746635e0?}, {0x151b0e78de90?, 0x7ff774142ebb?, 0x11?})
99+
C:/Program Files/Go/src/testing/testing.go:1228 +0x59
100+
github.com/letsencrypt/boulder/test.AssertNotError(0x151b0e782000, {0x7ff774176220, 0x151b0e697aa0}, {0x7ff7741533ff, 0x26})
101+
C:/Users/mahin/Desktop/VS Projects/boulder/boulder/test/asserts.go:73 +0xb7
102+
github.com/letsencrypt/boulder/db.TestWrappedMap(0x151b0e782000)
103+
C:/Users/mahin/Desktop/VS Projects/boulder/boulder/db/map_test.go:299 +0x10b
104+
testing.tRunner(0x151b0e782000, 0x7ff77416da88)
105+
C:/Program Files/Go/src/testing/testing.go:2036 +0xc3
106+
created by testing.(*T).Run in goroutine 1
107+
C:/Program Files/Go/src/testing/testing.go:2101 +0x4a9
108+
FAIL github.com/letsencrypt/boulder/db 0.970s
109+
ok github.com/letsencrypt/boulder/errors (cached)
110+
? github.com/letsencrypt/boulder/features [no test files]
111+
FAIL github.com/letsencrypt/boulder/goodkey [build failed]
112+
FAIL github.com/letsencrypt/boulder/goodkey/sagoodkey [build failed]
113+
FAIL github.com/letsencrypt/boulder/grpc [build failed]
114+
ok github.com/letsencrypt/boulder/grpc/creds 1.958s
115+
? github.com/letsencrypt/boulder/grpc/internal/backoff [no test files]
116+
? github.com/letsencrypt/boulder/grpc/internal/grpcrand [no test files]
117+
ok github.com/letsencrypt/boulder/grpc/internal/leakcheck (cached)
118+
FAIL github.com/letsencrypt/boulder/grpc/internal/resolver/dns [build failed]
119+
? github.com/letsencrypt/boulder/grpc/internal/testutils [no test files]
120+
ok github.com/letsencrypt/boulder/grpc/noncebalancer (cached)
121+
ok github.com/letsencrypt/boulder/grpc/noncebalancerv1 (cached)
122+
? github.com/letsencrypt/boulder/grpc/test_proto [no test files]
123+
ok github.com/letsencrypt/boulder/iana 0.557s
124+
ok github.com/letsencrypt/boulder/identifier (cached)
125+
FAIL github.com/letsencrypt/boulder/issuance [build failed]
126+
FAIL github.com/letsencrypt/boulder/linter [build failed]
127+
FAIL github.com/letsencrypt/boulder/linter/lints [build failed]
128+
FAIL github.com/letsencrypt/boulder/linter/lints/cabf_br [build failed]
129+
FAIL github.com/letsencrypt/boulder/linter/lints/chrome [build failed]
130+
FAIL github.com/letsencrypt/boulder/linter/lints/cpcps [build failed]
131+
FAIL github.com/letsencrypt/boulder/linter/lints/rfc [build failed]
132+
FAIL github.com/letsencrypt/boulder/linter/lints/test [build failed]
133+
FAIL github.com/letsencrypt/boulder/linter/pkimetal [build failed]
134+
? github.com/letsencrypt/boulder/metrics [no test files]
135+
ok github.com/letsencrypt/boulder/metrics/measured_http 2.491s
136+
FAIL github.com/letsencrypt/boulder/mocks [build failed]
137+
? github.com/letsencrypt/boulder/mtca/proto [no test files]
138+
FAIL github.com/letsencrypt/boulder/mtpublisher [build failed]
139+
ok github.com/letsencrypt/boulder/must (cached)
140+
ok github.com/letsencrypt/boulder/nonce (cached)
141+
? github.com/letsencrypt/boulder/nonce/proto [no test files]
142+
FAIL github.com/letsencrypt/boulder/observer [build failed]
143+
? github.com/letsencrypt/boulder/observer/obsclient [no test files]
144+
FAIL github.com/letsencrypt/boulder/observer/probers [build failed]
145+
FAIL github.com/letsencrypt/boulder/observer/probers/aia [build failed]
146+
FAIL github.com/letsencrypt/boulder/observer/probers/ccadb [build failed]
147+
FAIL github.com/letsencrypt/boulder/observer/probers/crl [build failed]
148+
FAIL github.com/letsencrypt/boulder/observer/probers/dns [build failed]
149+
FAIL github.com/letsencrypt/boulder/observer/probers/http [build failed]
150+
FAIL github.com/letsencrypt/boulder/observer/probers/mock [build failed]
151+
FAIL github.com/letsencrypt/boulder/observer/probers/tls [build failed]
152+
FAIL github.com/letsencrypt/boulder/pkcs11helpers [build failed]
153+
FAIL github.com/letsencrypt/boulder/policy [build failed]
154+
ok github.com/letsencrypt/boulder/precert 0.519s
155+
FAIL github.com/letsencrypt/boulder/privatekey [build failed]
156+
ok github.com/letsencrypt/boulder/probs (cached)
157+
FAIL github.com/letsencrypt/boulder/publisher [build failed]
158+
? github.com/letsencrypt/boulder/publisher/proto [no test files]
159+
FAIL github.com/letsencrypt/boulder/ra [build failed]
160+
? github.com/letsencrypt/boulder/ra/proto [no test files]
161+
FAIL github.com/letsencrypt/boulder/ratelimits [build failed]
162+
FAIL github.com/letsencrypt/boulder/redis [build failed]
163+
? github.com/letsencrypt/boulder/revocation [no test files]
164+
FAIL github.com/letsencrypt/boulder/sa [build failed]
165+
? github.com/letsencrypt/boulder/sa/proto [no test files]
166+
? github.com/letsencrypt/boulder/sa/satest [no test files]
167+
FAIL github.com/letsencrypt/boulder/salesforce [build failed]
168+
? github.com/letsencrypt/boulder/salesforce/email/proto [no test files]
169+
FAIL github.com/letsencrypt/boulder/sfe [build failed]
170+
ok github.com/letsencrypt/boulder/sfe/forms (cached)
171+
ok github.com/letsencrypt/boulder/sfe/zendesk (cached)
172+
ok github.com/letsencrypt/boulder/strictyaml (cached)
173+
? github.com/letsencrypt/boulder/test [no test files]
174+
FAIL github.com/letsencrypt/boulder/test/aia-test-srv [build failed]
175+
FAIL github.com/letsencrypt/boulder/test/boulder-tools/flushredis [build failed]
176+
FAIL github.com/letsencrypt/boulder/test/certs [build failed]
177+
FAIL github.com/letsencrypt/boulder/test/chall-test-srv [build failed]
178+
? github.com/letsencrypt/boulder/test/chall-test-srv-client [no test files]
179+
? github.com/letsencrypt/boulder/test/checkari [no test files]
180+
FAIL github.com/letsencrypt/boulder/test/ct-test-srv [build failed]
181+
FAIL github.com/letsencrypt/boulder/test/health-checker [build failed]
182+
? github.com/letsencrypt/boulder/test/inmem/nonce [no test files]
183+
FAIL github.com/letsencrypt/boulder/test/inmem/ra [build failed]
184+
FAIL github.com/letsencrypt/boulder/test/inmem/sa [build failed]
185+
? github.com/letsencrypt/boulder/test/list-features [no test files]
186+
FAIL github.com/letsencrypt/boulder/test/load-generator [build failed]
187+
--- FAIL: TestNew (0.02s)
188+
--- FAIL: TestNew/unreachable_directory_URL (0.01s)
189+
directory_test.go:182: String [Get "http://localhost:1987": dial tcp [::1]:1987: connectex: No connection could be made because the target machine actively refused it.] does not contain [connect: connection refused]
190+
FAIL
191+
FAIL github.com/letsencrypt/boulder/test/load-generator/acme 2.319s
192+
FAIL github.com/letsencrypt/boulder/test/s3-test-srv [build failed]
193+
FAIL github.com/letsencrypt/boulder/test/salesforce-test-srv [build failed]
194+
? github.com/letsencrypt/boulder/test/vars [no test files]
195+
FAIL github.com/letsencrypt/boulder/test/zendesk-test-srv [build failed]
196+
ok github.com/letsencrypt/boulder/test/zendeskfake (cached)
197+
? github.com/letsencrypt/boulder/tools/crldps [no test files]
198+
FAIL github.com/letsencrypt/boulder/tools/nameid [build failed]
199+
? github.com/letsencrypt/boulder/tools/release/branch [no test files]
200+
? github.com/letsencrypt/boulder/tools/release/tag [no test files]
201+
ok github.com/letsencrypt/boulder/trees/cosigned 0.388s
202+
FAIL github.com/letsencrypt/boulder/unpause [build failed]
203+
FAIL github.com/letsencrypt/boulder/va [build failed]
204+
FAIL github.com/letsencrypt/boulder/va/config [build failed]
205+
? github.com/letsencrypt/boulder/va/proto [no test files]
206+
FAIL github.com/letsencrypt/boulder/web [build failed]
207+
FAIL github.com/letsencrypt/boulder/wfe2 [build failed]
208+
FAIL

0 commit comments

Comments
 (0)