boulder/vendor/github.com/google/certificate-transparency-go
dependabot[bot] 75acd40df1
build(deps): bump github.com/google/certificate-transparency-go from 1.1.4 to 1.1.6 (#6975)
Update google/certificate-transparency-go from 1.1.4 to 1.1.6
Release notes: https://github.com/google/certificate-transparency-go/releases/tag/v1.1.6
Changelog: https://github.com/google/certificate-transparency-go/compare/v1.1.4...v1.1.6

Update prometheus/client_golang from v1.14.0 to v1.15.1
Release notes: https://github.com/prometheus/client_golang/releases/tag/v1.15.1
Changelog: https://github.com/prometheus/client_golang/compare/v1.14.0...v1.15.1

Update prometheus/client_model from v0.3.0 to v0.4.0
Release notes: https://github.com/prometheus/client_model/releases/tag/v0.4.0
Changelog: https://github.com/prometheus/client_model/compare/v0.3.0...v0.4.0

Update x/sync from v0.1.0 to v0.2.0
Changelog: https://github.com/golang/sync/compare/v0.1.0...v0.2.0

Minor updates to various indirect dependencies as well.

The prometheus/client_golang update changes the type of
`prometheus.Desc.variableLabels` from `[]string` to
`prometheus.ConstrainedLabels`, which changes the string representation
of that field, necessitating a minor test expectations update in
//rocsp/metrics_test.

Fixes https://github.com/letsencrypt/boulder/issues/4548
2023-07-21 11:28:56 -07:00
..
asn1 build(deps): Bump github.com/google/certificate-transparency-go from 1.0.22-0.20181127102053-c25855a82c75 to 1.1.4 (#6767) 2023-03-27 14:26:18 -04:00
client build(deps): bump github.com/google/certificate-transparency-go from 1.1.4 to 1.1.6 (#6975) 2023-07-21 11:28:56 -07:00
jsonclient build(deps): bump github.com/google/certificate-transparency-go from 1.1.4 to 1.1.6 (#6975) 2023-07-21 11:28:56 -07:00
tls build(deps): bump github.com/google/certificate-transparency-go from 1.1.4 to 1.1.6 (#6975) 2023-07-21 11:28:56 -07:00
x509 build(deps): Bump github.com/google/certificate-transparency-go from 1.0.22-0.20181127102053-c25855a82c75 to 1.1.4 (#6767) 2023-03-27 14:26:18 -04:00
.gitignore build(deps): Bump github.com/google/certificate-transparency-go from 1.0.22-0.20181127102053-c25855a82c75 to 1.1.4 (#6767) 2023-03-27 14:26:18 -04:00
.golangci.yaml build(deps): bump github.com/google/certificate-transparency-go from 1.1.4 to 1.1.6 (#6975) 2023-07-21 11:28:56 -07:00
AUTHORS build(deps): bump github.com/google/certificate-transparency-go from 1.1.4 to 1.1.6 (#6975) 2023-07-21 11:28:56 -07:00
CHANGELOG.md build(deps): bump github.com/google/certificate-transparency-go from 1.1.4 to 1.1.6 (#6975) 2023-07-21 11:28:56 -07:00
CODEOWNERS build(deps): Bump github.com/google/certificate-transparency-go from 1.0.22-0.20181127102053-c25855a82c75 to 1.1.4 (#6767) 2023-03-27 14:26:18 -04:00
CONTRIBUTING.md Switch CT import path (#2769) 2017-05-17 13:41:33 -07:00
CONTRIBUTORS build(deps): bump github.com/google/certificate-transparency-go from 1.1.4 to 1.1.6 (#6975) 2023-07-21 11:28:56 -07:00
LICENSE Switch CT import path (#2769) 2017-05-17 13:41:33 -07:00
PULL_REQUEST_TEMPLATE.md build(deps): Bump github.com/google/certificate-transparency-go from 1.0.22-0.20181127102053-c25855a82c75 to 1.1.4 (#6767) 2023-03-27 14:26:18 -04:00
README.md build(deps): bump github.com/google/certificate-transparency-go from 1.1.4 to 1.1.6 (#6975) 2023-07-21 11:28:56 -07:00
cloudbuild.yaml build(deps): bump github.com/google/certificate-transparency-go from 1.1.4 to 1.1.6 (#6975) 2023-07-21 11:28:56 -07:00
cloudbuild_master.yaml build(deps): bump github.com/google/certificate-transparency-go from 1.1.4 to 1.1.6 (#6975) 2023-07-21 11:28:56 -07:00
cloudbuild_tag.yaml build(deps): bump github.com/google/certificate-transparency-go from 1.1.4 to 1.1.6 (#6975) 2023-07-21 11:28:56 -07:00
codecov.yml build(deps): Bump github.com/google/certificate-transparency-go from 1.0.22-0.20181127102053-c25855a82c75 to 1.1.4 (#6767) 2023-03-27 14:26:18 -04:00
proto_gen.go build(deps): Bump github.com/google/certificate-transparency-go from 1.0.22-0.20181127102053-c25855a82c75 to 1.1.4 (#6767) 2023-03-27 14:26:18 -04:00
serialization.go build(deps): Bump github.com/google/certificate-transparency-go from 1.0.22-0.20181127102053-c25855a82c75 to 1.1.4 (#6767) 2023-03-27 14:26:18 -04:00
signatures.go build(deps): Bump github.com/google/certificate-transparency-go from 1.0.22-0.20181127102053-c25855a82c75 to 1.1.4 (#6767) 2023-03-27 14:26:18 -04:00
types.go build(deps): Bump github.com/google/certificate-transparency-go from 1.0.22-0.20181127102053-c25855a82c75 to 1.1.4 (#6767) 2023-03-27 14:26:18 -04:00

README.md

Certificate Transparency: Go Code

Go Report Card GoDoc CodeQL workflow

This repository holds Go code related to Certificate Transparency (CT). The repository requires Go version 1.19.

Repository Structure

The main parts of the repository are:

  • Encoding libraries:
    • asn1/ and x509/ are forks of the upstream Go encoding/asn1 and crypto/x509 libraries. We maintain separate forks of these packages because CT is intended to act as an observatory of certificates across the ecosystem; as such, we need to be able to process somewhat-malformed certificates that the stricter upstream code would (correctly) reject. Our x509 fork also includes code for working with the pre-certificates defined in RFC 6962.
    • tls holds a library for processing TLS-encoded data as described in RFC 5246.
    • x509util/ provides additional utilities for dealing with x509.Certificates.
  • CT client libraries:
    • The top-level ct package (in .) holds types and utilities for working with CT data structures defined in RFC 6962.
    • client/ and jsonclient/ hold libraries that allow access to CT Logs via HTTP entrypoints described in section 4 of RFC 6962.
    • dnsclient/ has a library that allows access to CT Logs over DNS.
    • scanner/ holds a library for scanning the entire contents of an existing CT Log.
  • CT Personality for Trillian:
    • trillian/ holds code that allows a Certificate Transparency Log to be run using a Trillian Log as its back-end -- see below.
  • Command line tools:
    • ./client/ctclient allows interaction with a CT Log.
    • ./ctutil/sctcheck allows SCTs (signed certificate timestamps) from a CT Log to be verified.
    • ./scanner/scanlog allows an existing CT Log to be scanned for certificates of interest; please be polite when running this tool against a Log.
    • ./x509util/certcheck allows display and verification of certificates
    • ./x509util/crlcheck allows display and verification of certificate revocation lists (CRLs).
  • Other libraries related to CT:
    • ctutil/ holds utility functions for validating and verifying CT data structures.
    • loglist3/ has a library for reading v3 JSON lists of CT Logs.

Trillian CT Personality

The trillian/ subdirectory holds code and scripts for running a CT Log based on the Trillian general transparency Log, and is documented separately.

Working on the Code

Developers who want to make changes to the codebase need some additional dependencies and tools, described in the following sections.

Running Codebase Checks

The scripts/presubmit.sh script runs various tools and tests over the codebase; please ensure this script passes before sending pull requests for review.

# Install golangci-lint
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.51.1

# Run code generation, build, test and linters
./scripts/presubmit.sh

# Run build, test and linters but skip code generation
./scripts/presubmit.sh  --no-generate

# Or just run the linters alone:
golangci-lint run

Rebuilding Generated Code

Some of the CT Go code is autogenerated from other files:

  • Protocol buffer message definitions are converted to .pb.go implementations.
  • A mock implementation of the Trillian gRPC API (in trillian/mockclient) is created with GoMock.

Re-generating mock or protobuffer files is only needed if you're changing the original files; if you do, you'll need to install the prerequisites:

  • tools written in go can be installed with a single run of go install (courtesy of tools.go and go.mod).
  • protoc tool: you'll need version 3.20.1 installed, and PATH updated to include its bin/ directory.

With tools installed, run the following:

go generate -x ./...  # hunts for //go:generate comments and runs them