Skip to content

Move parser into staticct.go #236

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

Merged
merged 3 commits into from
Apr 7, 2025
Merged

Conversation

phbnf
Copy link
Collaborator

@phbnf phbnf commented Apr 7, 2025

While I'm there, rename staticctapi.go to staticct.go, I forgot to do this in the previous PR.

@phbnf phbnf marked this pull request as ready for review April 7, 2025 16:34
@@ -102,3 +103,45 @@ func (t *EntryBundle) UnmarshalText(raw []byte) error {
t.Entries = entries
return nil
}

// parseCTExtensions parses CTEXtensions into an index.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// parseCTExtensions parses CTEXtensions into an index.
// parseCTExtensions parses CTExtensions into an index.

extensions := cryptobyte.String(extensionBytes)
var extensionType uint8
var extensionData cryptobyte.String
var leafIdx int64
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: this can't be -ve

Suggested change
var leafIdx int64
var leafIdx uint64

}
if !extensionData.Empty() ||
!extensions.Empty() {
return 0, fmt.Errorf("invalid data tile extensions: %v", ext)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
return 0, fmt.Errorf("invalid data tile extensions: %v", ext)
return 0, fmt.Errorf("invalid SCT extension data: %v", ext)

@phbnf phbnf merged commit afe9c88 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
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants