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 hammering with real certs copied from a source log #392

Merged
merged 6 commits into from Dec 10, 2018

Conversation

daviddrysdale
Copy link
Contributor

@daviddrysdale daviddrysdale commented Nov 7, 2018

The first commit shuffles a lot of code into different places but doesn't change behaviour much:

  • dba696c integration: modularize test cert generation

The significant new functionality is in:

  • cd9868d integration: generate chains from a source log

And then there's two last commits that plumb the new function into the hammer main:

  • 1e913ed ct_hammer: put chain generator creation into a factory
  • 10ca2ae ct_hammer: add options for copy-chain generation

@codecov
Copy link

codecov bot commented Nov 7, 2018

Codecov Report

Merging #392 into master will decrease coverage by 0.73%.
The diff coverage is 34.81%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #392      +/-   ##
==========================================
- Coverage   68.31%   67.57%   -0.74%     
==========================================
  Files          82       84       +2     
  Lines        9972    10077     +105     
==========================================
- Hits         6812     6810       -2     
- Misses       2580     2686     +106     
- Partials      580      581       +1
Impacted Files Coverage Δ
trillian/integration/copier.go 0% <0%> (ø)
trillian/integration/ct_integration.go 44.36% <37.5%> (-3.48%) ⬇️
trillian/integration/hammer.go 18.21% <40%> (-1.23%) ⬇️
trillian/integration/chains.go 65.28% <65.28%> (ø)

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 a3e73eb...d42d32a. Read the comment docs.

@daviddrysdale daviddrysdale changed the title Prepare the hammer for alternate methods of chain generation Allow hammering with real certs copied from a source log Nov 8, 2018
@daviddrysdale daviddrysdale removed the WIP label Nov 9, 2018
@daviddrysdale daviddrysdale mentioned this pull request Nov 16, 2018
trillian/integration/chains.go Show resolved Hide resolved
trillian/integration/chains.go Show resolved Hide resolved
trillian/integration/chains.go Show resolved Hide resolved
trillian/integration/chains.go Show resolved Hide resolved
trillian/integration/copier.go Outdated Show resolved Hide resolved
trillian/integration/copier.go Outdated Show resolved Hide resolved
trillian/integration/copier.go Show resolved Hide resolved
trillian/integration/ct_hammer/main.go Show resolved Hide resolved
trillian/integration/ct_hammer/main.go Show resolved Hide resolved
Create a new type for synthetic cert generation and move the
cert generation code into a new chains.go file. Also make the
notAfter calculation a one-off, per-Log operation.

Access this new SyntheticChainGenerator object via a new
ChainGenerator interface, to allow for other test cert
generators in future.
This provides another implementation of the ChainGenerator interface
so that copied chains can be used interchangeably with synthetic
chains in test tools.
This allow the tool to be re-used and generate different certs for
add-[pre-]chain each time (assuming a large enough source log)
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.

None yet

4 participants