@@ -25,7 +25,7 @@ import (
25
25
"strings"
26
26
"time"
27
27
28
- "github.com/transparency-dev/static-ct/internal/tcti "
28
+ "github.com/transparency-dev/static-ct/internal/ct "
29
29
"github.com/transparency-dev/static-ct/internal/x509util"
30
30
"github.com/transparency-dev/static-ct/storage"
31
31
)
@@ -62,7 +62,7 @@ type ChainValidationConfig struct {
62
62
NotAfterLimit * time.Time
63
63
}
64
64
65
- // systemTimeSource implements tcti .TimeSource.
65
+ // systemTimeSource implements ct .TimeSource.
66
66
type systemTimeSource struct {}
67
67
68
68
// Now returns the true current local time.
@@ -74,7 +74,7 @@ var sysTimeSource = systemTimeSource{}
74
74
75
75
// newChainValidator checks that a chain validation config is valid,
76
76
// parses it, and loads resources to validate chains.
77
- func newChainValidator (cfg ChainValidationConfig ) (tcti .ChainValidator , error ) {
77
+ func newChainValidator (cfg ChainValidationConfig ) (ct .ChainValidator , error ) {
78
78
// Load the trusted roots.
79
79
if cfg .RootsPEMFile == "" {
80
80
return nil , errors .New ("empty rootsPemFile" )
@@ -98,7 +98,7 @@ func newChainValidator(cfg ChainValidationConfig) (tcti.ChainValidator, error) {
98
98
// Filter which extended key usages are allowed.
99
99
if cfg .ExtKeyUsages != "" {
100
100
lExtKeyUsages := strings .Split (cfg .ExtKeyUsages , "," )
101
- extKeyUsages , err = tcti .ParseExtKeyUsages (lExtKeyUsages )
101
+ extKeyUsages , err = ct .ParseExtKeyUsages (lExtKeyUsages )
102
102
if err != nil {
103
103
return nil , fmt .Errorf ("failed to parse ExtKeyUsages: %v" , err )
104
104
}
@@ -108,13 +108,13 @@ func newChainValidator(cfg ChainValidationConfig) (tcti.ChainValidator, error) {
108
108
// Filter which extensions are rejected.
109
109
if cfg .RejectExtensions != "" {
110
110
lRejectExtensions := strings .Split (cfg .RejectExtensions , "," )
111
- rejectExtIds , err = tcti .ParseOIDs (lRejectExtensions )
111
+ rejectExtIds , err = ct .ParseOIDs (lRejectExtensions )
112
112
if err != nil {
113
113
return nil , fmt .Errorf ("failed to parse RejectExtensions: %v" , err )
114
114
}
115
115
}
116
116
117
- cv := tcti .NewChainValidator (roots , cfg .RejectExpired , cfg .RejectUnexpired , cfg .NotAfterStart , cfg .NotAfterLimit , extKeyUsages , rejectExtIds )
117
+ cv := ct .NewChainValidator (roots , cfg .RejectExpired , cfg .RejectUnexpired , cfg .NotAfterStart , cfg .NotAfterLimit , extKeyUsages , rejectExtIds )
118
118
return & cv , nil
119
119
}
120
120
@@ -126,19 +126,19 @@ func NewLogHandler(ctx context.Context, origin string, signer crypto.Signer, cfg
126
126
if err != nil {
127
127
return nil , fmt .Errorf ("newCertValidationOpts(): %v" , err )
128
128
}
129
- log , err := tcti .NewLog (ctx , origin , signer , cv , cs , sysTimeSource )
129
+ log , err := ct .NewLog (ctx , origin , signer , cv , cs , sysTimeSource )
130
130
if err != nil {
131
131
return nil , fmt .Errorf ("newLog(): %v" , err )
132
132
}
133
133
134
- opts := & tcti .HandlerOptions {
134
+ opts := & ct .HandlerOptions {
135
135
Deadline : httpDeadline ,
136
- RequestLog : & tcti .DefaultRequestLog {},
136
+ RequestLog : & ct .DefaultRequestLog {},
137
137
MaskInternalErrors : maskInternalErrors ,
138
138
TimeSource : sysTimeSource ,
139
139
}
140
140
141
- handlers := tcti .NewPathHandlers (ctx , opts , log )
141
+ handlers := ct .NewPathHandlers (ctx , opts , log )
142
142
mux := http .NewServeMux ()
143
143
// Register handlers for all the configured logs.
144
144
for path , handler := range handlers {
0 commit comments