letsencrypt / letsencrypt/boulder
Split privatekey.go into the issuance and cmd/admin packages
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 5.8k
- Forks
- 649
- Avg merge
- 3d 23h
- Merged PRs (30d)
- 24
Description
The privatekey package is used from two locations:
- cmd/admin/ uses it to load compromised keys which are about to be blocked
- issuance/ uses it to load CA keys from files on disk (intended to be test-only, since production keys live on HSMs)
These two callers have very different needs. In particular, while it might make sense to sign a nil message to verify that the loaded key actually functions as a private key when that key is already compromised and about to be blocked... it does not make sense to do so when the loaded key is intended to be a (test) CA key.
We should split the privatekey package's code into its two calling locations, and ensure that potentially dangerous functionality like "sign a nil message" is not exposed as a general purpose package by deleting the privatekey package.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading privatekey.go and tracing its callers from cmd/admin/ and issuance/. Separate the two callers' key-loading needs, keeping any compromised-key validation behavior with cmd/admin/ rather than exposing it generally. Done means the privatekey package is deleted and both call sites use their appropriate split implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend, cryptography, security
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100