Skip to content

Commit 7c8d0d8

Browse files
committed
s/scti/tcti
1 parent 6146873 commit 7c8d0d8

14 files changed

+24
-24
lines changed

ctlog.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
"strings"
2626
"time"
2727

28-
"github.com/transparency-dev/static-ct/internal/scti"
28+
"github.com/transparency-dev/static-ct/internal/tcti"
2929
"github.com/transparency-dev/static-ct/internal/x509util"
3030
"github.com/transparency-dev/static-ct/storage"
3131
)
@@ -62,7 +62,7 @@ type ChainValidationConfig struct {
6262
NotAfterLimit *time.Time
6363
}
6464

65-
// systemTimeSource implments scti.TimeSource.
65+
// systemTimeSource implements tcti.TimeSource.
6666
type systemTimeSource struct{}
6767

6868
// Now returns the true current local time.
@@ -74,7 +74,7 @@ var sysTimeSource = systemTimeSource{}
7474

7575
// newChainValidator checks that a chain validation config is valid,
7676
// parses it, and loads resources to validate chains.
77-
func newChainValidator(cfg ChainValidationConfig) (scti.ChainValidator, error) {
77+
func newChainValidator(cfg ChainValidationConfig) (tcti.ChainValidator, error) {
7878
// Load the trusted roots.
7979
if cfg.RootsPEMFile == "" {
8080
return nil, errors.New("empty rootsPemFile")
@@ -98,7 +98,7 @@ func newChainValidator(cfg ChainValidationConfig) (scti.ChainValidator, error) {
9898
// Filter which extended key usages are allowed.
9999
if cfg.ExtKeyUsages != "" {
100100
lExtKeyUsages := strings.Split(cfg.ExtKeyUsages, ",")
101-
extKeyUsages, err = scti.ParseExtKeyUsages(lExtKeyUsages)
101+
extKeyUsages, err = tcti.ParseExtKeyUsages(lExtKeyUsages)
102102
if err != nil {
103103
return nil, fmt.Errorf("failed to parse ExtKeyUsages: %v", err)
104104
}
@@ -108,13 +108,13 @@ func newChainValidator(cfg ChainValidationConfig) (scti.ChainValidator, error) {
108108
// Filter which extensions are rejected.
109109
if cfg.RejectExtensions != "" {
110110
lRejectExtensions := strings.Split(cfg.RejectExtensions, ",")
111-
rejectExtIds, err = scti.ParseOIDs(lRejectExtensions)
111+
rejectExtIds, err = tcti.ParseOIDs(lRejectExtensions)
112112
if err != nil {
113113
return nil, fmt.Errorf("failed to parse RejectExtensions: %v", err)
114114
}
115115
}
116116

117-
cv := scti.NewChainValidator(roots, cfg.RejectExpired, cfg.RejectUnexpired, cfg.NotAfterStart, cfg.NotAfterLimit, extKeyUsages, rejectExtIds)
117+
cv := tcti.NewChainValidator(roots, cfg.RejectExpired, cfg.RejectUnexpired, cfg.NotAfterStart, cfg.NotAfterLimit, extKeyUsages, rejectExtIds)
118118
return &cv, nil
119119
}
120120

@@ -126,19 +126,19 @@ func NewLogHandler(ctx context.Context, origin string, signer crypto.Signer, cfg
126126
if err != nil {
127127
return nil, fmt.Errorf("newCertValidationOpts(): %v", err)
128128
}
129-
log, err := scti.NewLog(ctx, origin, signer, cv, cs, sysTimeSource)
129+
log, err := tcti.NewLog(ctx, origin, signer, cv, cs, sysTimeSource)
130130
if err != nil {
131131
return nil, fmt.Errorf("newLog(): %v", err)
132132
}
133133

134-
opts := &scti.HandlerOptions{
134+
opts := &tcti.HandlerOptions{
135135
Deadline: httpDeadline,
136-
RequestLog: &scti.DefaultRequestLog{},
136+
RequestLog: &tcti.DefaultRequestLog{},
137137
MaskInternalErrors: maskInternalErrors,
138138
TimeSource: sysTimeSource,
139139
}
140140

141-
handlers := scti.NewPathHandlers(ctx, opts, log)
141+
handlers := tcti.NewPathHandlers(ctx, opts, log)
142142
mux := http.NewServeMux()
143143
// Register handlers for all the configured logs.
144144
for path, handler := range handlers {

internal/scti/chain_validation.go renamed to internal/tcti/chain_validation.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package scti
15+
package tcti
1616

1717
import (
1818
"bytes"

internal/scti/chain_validation_test.go renamed to internal/tcti/chain_validation_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package scti
15+
package tcti
1616

1717
import (
1818
"crypto/x509"

internal/scti/ctlog.go renamed to internal/tcti/ctlog.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package scti
1+
package tcti
22

33
import (
44
"context"

internal/scti/ctlog_test.go renamed to internal/tcti/ctlog_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package scti
1+
package tcti
22

33
import (
44
"context"

internal/scti/handlers.go renamed to internal/tcti/handlers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package scti
15+
package tcti
1616

1717
import (
1818
"context"

internal/scti/handlers_test.go renamed to internal/tcti/handlers_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package scti
15+
package tcti
1616

1717
import (
1818
"bufio"

internal/scti/otel.go renamed to internal/tcti/otel.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package scti
15+
package tcti
1616

1717
import (
1818
"go.opentelemetry.io/otel"
1919
"go.opentelemetry.io/otel/attribute"
2020
"k8s.io/klog/v2"
2121
)
2222

23-
const name = "github.com/transparency-dev/static-ct/internal/scti"
23+
const name = "github.com/transparency-dev/static-ct/internal/tcti"
2424

2525
var (
2626
meter = otel.Meter(name)

internal/scti/requestlog.go renamed to internal/tcti/requestlog.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package scti
15+
package tcti
1616

1717
import (
1818
"context"

internal/scti/signatures.go renamed to internal/tcti/signatures.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package scti
15+
package tcti
1616

1717
import (
1818
"crypto"

internal/scti/signatures_test.go renamed to internal/tcti/signatures_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package scti
15+
package tcti
1616

1717
import (
1818
"bytes"

internal/scti/timesource.go renamed to internal/tcti/timesource.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package scti
15+
package tcti
1616

1717
import "time"
1818

internal/scti/timesource_export_test.go renamed to internal/tcti/timesource_export_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package scti
15+
package tcti
1616

1717
import "time"
1818

storage/storage.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ type IssuerStorage interface {
4949
AddIssuersIfNotExist(ctx context.Context, kv []KV) error
5050
}
5151

52-
// CTStorage implements scti.Storage.
52+
// CTStorage implements tcti.Storage.
5353
type CTStorage struct {
5454
storeData func(context.Context, *ctonly.Entry) tessera.IndexFuture
5555
storeIssuers func(context.Context, []KV) error

0 commit comments

Comments
 (0)