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

Allow requests for consistency proofs where first=second #74

Merged
merged 1 commit into from
Sep 7, 2017

Conversation

Martin2112
Copy link
Contributor

These requests don't really make sense but this is for better compatibility with C++ logs, which return an empty proof for this case. Needs log backend change in other repo:

google/trillian#819

These requests don't really make sense but this is for better
compatibility with C++ logs, which return an empty proof. Needs log
backend change in other repo.
@codecov-io
Copy link

codecov-io commented Sep 7, 2017

Codecov Report

Merging #74 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #74   +/-   ##
=======================================
  Coverage   68.38%   68.38%           
=======================================
  Files          54       54           
  Lines        6620     6620           
=======================================
  Hits         4527     4527           
  Misses       1576     1576           
  Partials      517      517
Impacted Files Coverage Δ
trillian/ctfe/handlers.go 78.26% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9548a1b...14a9edd. Read the comment docs.

@@ -875,7 +875,7 @@ func parseGetSTHConsistencyRange(r *http.Request) (int64, int64, error) {
if first < 0 || second < 0 {
return 0, 0, fmt.Errorf("first and second params cannot be <0: %d %d", first, second)
}
if second <= first {
if second < first {
return 0, 0, fmt.Errorf("invalid first, second params: %d %d", first, second)
}

Copy link
Member

Choose a reason for hiding this comment

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

Did you consider just returning an empty proof in here and short-circuiting the RPC?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did but we then can't validate that the parameters are inside the valid tree size range.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Though actually doesn't it cache STHs now? Perhaps we can.

@Martin2112 Martin2112 merged commit abcdbf6 into google:master Sep 7, 2017
@Martin2112 Martin2112 deleted the fix-consistency-range branch September 7, 2017 13:29
steurer pushed a commit to steurer/certificate-transparency-go that referenced this pull request Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants