boulder
boulder copied to clipboard
Name ID tool
We need to calculate boulder's "NameID"s occasionally. Having a tool inside boulder source tree would be helpful (doesn't have to be built; something I can go run
is fine)
package main
import "fmt"
import "os"
import "github.com/letsencrypt/boulder/issuance"
func main() {
issuer, _ := issuance.LoadCertificate(os.Args[1])
fmt.Println(issuer.NameID())
}
Would it be equivalently helpful for it to be in the sre-tools tree?
I don't really care where it lives, but since it's essentially just exposing a pair of Boulder functions, it seems to make the most sense to drop it here somewhere.
Yeah, makes sense. Boulder just doesn't really have a "random scripts and tools" directory right now, at least not for go code.
A similar example might be the block-a-key or list-features tool currently under test/
https://github.com/letsencrypt/boulder/blob/main/test/list-features/list-features.go https://github.com/letsencrypt/boulder/blob/main/test/block-a-key/main.go
Perhaps they could all be relocated to the current top-level tools/, which doesn't have Go in it today, or a cmd/tools/ directory. I think I'd expect to see this under cmd/ somewhere, personally.