File tree Expand file tree Collapse file tree 5 files changed +12
-32
lines changed Expand file tree Collapse file tree 5 files changed +12
-32
lines changed Original file line number Diff line number Diff line change 24
24
import java .nio .file .Path ;
25
25
import java .security .InvalidKeyException ;
26
26
import java .security .NoSuchAlgorithmException ;
27
+ import java .security .cert .CertificateException ;
27
28
import java .security .spec .InvalidKeySpecException ;
28
29
29
- import com .google .common .base .Preconditions ;
30
-
31
- import dev .sigstore .trustroot .SigstoreConfigurationException ;
32
- import dev .sigstore .trustroot .SigstoreTrustedRoot ;
33
- import dev .sigstore .tuf .SigstoreTufClient ;
34
-
35
30
@ FunctionalInterface
36
31
public interface TrustedRootProvider {
37
32
@@ -47,7 +42,7 @@ static TrustedRootProvider from(SigstoreTufClient.Builder tufClientBuilder) {
47
42
} catch (IOException
48
43
| NoSuchAlgorithmException
49
44
| InvalidKeySpecException
50
- | InvalidKeyException
45
+ | InvalidKeyException
51
46
| CertificateException ex ) {
52
47
throw new SigstoreConfigurationException (ex );
53
48
}
Original file line number Diff line number Diff line change 15
15
*/
16
16
package dev .sigstore .trustroot ;
17
17
18
- import java .io .IOException ;
19
- import java .io .InputStream ;
18
+ import com .google .api .client .util .Lists ;
20
19
import com .google .protobuf .util .JsonFormat ;
21
- import java .io .InputStreamReader ;
22
- import java .nio .charset .StandardCharsets ;
20
+ import dev .sigstore .proto .trustroot .v1 .TrustedRoot ;
23
21
import dev .sigstore .proto .trustroot .v1 .TrustedRootOrBuilder ;
24
22
import java .io .IOException ;
25
23
import java .io .InputStream ;
28
26
import java .security .cert .CertificateException ;
29
27
import java .util .List ;
30
28
import java .util .stream .Collectors ;
31
-
32
29
import org .immutables .value .Value .Immutable ;
33
30
34
- import com .google .api .client .util .Lists ;
35
- import com .google .protobuf .util .JsonFormat ;
36
-
37
- import dev .sigstore .proto .trustroot .v1 .TrustedRoot ;
38
- import dev .sigstore .proto .trustroot .v1 .TrustedRootOrBuilder ;
39
-
40
31
@ Immutable
41
32
public interface SigstoreTrustedRoot {
42
33
Original file line number Diff line number Diff line change 15
15
*/
16
16
package dev .sigstore .tuf ;
17
17
18
+ import com .google .common .annotations .VisibleForTesting ;
19
+ import com .google .common .base .Preconditions ;
20
+ import com .google .protobuf .util .JsonFormat ;
21
+ import dev .sigstore .proto .trustroot .v1 .TrustedRoot ;
22
+ import dev .sigstore .trustroot .SigstoreConfigurationException ;
23
+ import dev .sigstore .trustroot .SigstoreTrustedRoot ;
18
24
import java .io .IOException ;
19
25
import java .net .MalformedURLException ;
20
26
import java .net .URL ;
23
29
import java .nio .file .Path ;
24
30
import java .security .InvalidKeyException ;
25
31
import java .security .NoSuchAlgorithmException ;
32
+ import java .security .cert .CertificateException ;
26
33
import java .security .spec .InvalidKeySpecException ;
27
34
import java .time .Duration ;
28
35
import java .time .Instant ;
29
36
30
- import com .google .common .annotations .VisibleForTesting ;
31
- import com .google .common .base .Preconditions ;
32
- import com .google .protobuf .util .JsonFormat ;
33
-
34
- import dev .sigstore .proto .trustroot .v1 .TrustedRoot ;
35
- import dev .sigstore .trustroot .SigstoreConfigurationException ;
36
- import dev .sigstore .trustroot .SigstoreTrustedRoot ;
37
-
38
37
/**
39
38
* Wrapper around {@link dev.sigstore.tuf.Updater} that provides access to sigstore specific
40
39
* metadata items in a convenient API.
Original file line number Diff line number Diff line change @@ -129,8 +129,7 @@ public void timestamp_failure_badResponse_nonRetryableError() throws Exception {
129
129
public void timestamp_failure_badResponse_RetryableError () throws Exception {
130
130
try (var server = new MockWebServer ()) {
131
131
for (var i = 0 ; i < 6 ; i ++) {
132
- server .enqueue (new
133
- MockResponse ().setResponseCode (500 ));
132
+ server .enqueue (new MockResponse ().setResponseCode (500 ));
134
133
}
135
134
server .start ();
136
135
Original file line number Diff line number Diff line change @@ -32,10 +32,6 @@ class SigstoreTrustedRootTest {
32
32
private static SigstoreTrustedRoot trustRoot ;
33
33
34
34
@ BeforeAll
35
- public static void initTrustRoot () throws Exception {
36
- trustRoot =
37
- SigstoreTrustedRoot .from (
38
- Resources .getResource ("dev/sigstore/trustroot/trusted_root.json" ).openStream ());
39
35
public static void initTrustRoot () throws Exception {
40
36
trustRoot =
41
37
SigstoreTrustedRoot .from (
You can’t perform that action at this time.
0 commit comments