Skip to content

Find a new home for some functions #245

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 11, 2025
Merged

Conversation

phbnf
Copy link
Collaborator

@phbnf phbnf commented Apr 8, 2025

Towards #244

entryFromChain: worker.go + handlers.go --> x509util/ct.go
verifyAddChain: handlers.go --> chain_validation.go
validateChain and verifyAddChain: functions to methods of ChainValidationOpts

@phbnf phbnf requested a review from roger2hk April 8, 2025 17:09
@phbnf phbnf marked this pull request as ready for review April 8, 2025 17:09
func validateChain(rawChain [][]byte, validationOpts ChainValidationOpts) ([]*x509.Certificate, error) {
func (opts ChainValidationOpts) validateChain(rawChain [][]byte) ([]*x509.Certificate, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

It sounds weird to add the validation function to the ChainValidationOpts type which is supposed to store the options.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah sorry I had not seen this comment! Your comment is on point: it's actually the next pr in the chain: phbnf/tesseract@functionsmove...phbnf:static-ct:interfaceverifier. This next PR actually goes further and defines an interface. I did not send it in this PR to make reviewing easier: this one just moves methods, then I'll define interface and rename everything.

Copy link
Contributor

Choose a reason for hiding this comment

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

Great. I'm looking forward to reviewing the next PR.

phbnf added 3 commits April 9, 2025 13:36
# Conflicts:
#	internal/hammer/loadtest/workers.go

# Conflicts:
#	internal/scti/handlers.go
@phbnf phbnf merged commit ee72274 into transparency-dev:main Apr 11, 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.

2 participants