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

Utilize a self-signed certificate and custom trust chain for test case cryptographic validation. #8

Open
amcgregor opened this issue Jan 4, 2022 · 2 comments

Comments

@amcgregor
Copy link

Unnecessary word of caution: Explicitly only for the test cases involving cryptographic code paths.

An example of this might include an end-to-end "integration" test with a generated QR image as source material. These test images can be pre-generated—and are unlikely to change—with only the public key shipped with the codebase for validation, or a tool such as git-crypt can be used to protect the private key in use. I've used this with good effect in the past, and it integrates using GPG, thus works well if code signing will be utilized anyway and can support multi-person teams.

@NCommander
Copy link
Owner

My general thought is to generate the keys on the fly for a given test signing pass, which is how I've done this for X.509 testing where I'll generate an entire CA on the fly as needed. I have reservations about documenting how that works more clearly, but there are a ton of github repos I found that can do just that so ... maybe that ship has already sailed ...

@NCommander
Copy link
Owner

I've implemented some skeleton support code to at least make this possible to calculate the KID from a given EC pubkey. Unfortunately, I ran into annoying licensing issues, which means implementing this is easier said than done. I'm not a big fan of having even private testsigning key in repo, so I'm thinking this is the way to go.

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

No branches or pull requests

2 participants