Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

split types into rfc6962 and staticctapi #234

Merged
merged 5 commits into from
Apr 7, 2025

Conversation

phbnf
Copy link
Collaborator

@phbnf phbnf commented Apr 4, 2025

Addressing #198 (review)

phbnf added 3 commits April 4, 2025 14:30
# Conflicts:
#	internal/scti/handlers_test.go
# Conflicts:
#	internal/scti/handlers_test.go

# Conflicts:
#	internal/scti/handlers_test.go
@phbnf phbnf requested review from roger2hk and AlCutter April 4, 2025 14:35
@phbnf phbnf marked this pull request as ready for review April 4, 2025 14:45
@@ -29,7 +29,7 @@ import (
"github.com/transparency-dev/merkle/proof"
"github.com/transparency-dev/merkle/rfc6962"
"github.com/transparency-dev/static-ct/internal/client"
"github.com/transparency-dev/static-ct/internal/types"
rfc69621 "github.com/transparency-dev/static-ct/internal/types/rfc6962"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
rfc69621 "github.com/transparency-dev/static-ct/internal/types/rfc6962"
"github.com/transparency-dev/static-ct/internal/types/rfc6962"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. I can't do this because of a different import, but I sorted this out.

@@ -246,7 +246,7 @@ func (w *LogWriter) Run(ctx context.Context) {

// TODO: Remove the json.Unmarshal by generating the chain and
// marshaling the add chain request from w.gen() at a later stage.
var req types.AddChainRequest
var req rfc69621.AddChainRequest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var req rfc69621.AddChainRequest
var req rfc6962.AddChainRequest

@@ -449,7 +449,7 @@ func isPreIssuer(cert *x509.Certificate) bool {
// Look for the extension in the Extensions field and not ExtKeyUsage
// since crypto/x509 does not recognize this extension as an ExtKeyUsage.
for _, ext := range cert.Extensions {
if types.OIDExtKeyUsageCertificateTransparency.Equal(ext.Id) {
if rfc69621.OIDExtKeyUsageCertificateTransparency.Equal(ext.Id) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if rfc69621.OIDExtKeyUsageCertificateTransparency.Equal(ext.Id) {
if rfc6962.OIDExtKeyUsageCertificateTransparency.Equal(ext.Id) {

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package types
package staticctapi
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

staticctapi is a bit "letter soupy", how about just staticct (or static-ct)?
Should be ok particularly since we're planning to rename this repo to tesseract...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- is not recommended in Go Style Guide.

Go package names should be short and contain only lowercase letters. A package name composed of multiple words should be left unbroken in all lowercase.

@phbnf phbnf merged commit 936b230 into transparency-dev:main Apr 7, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants