boulder icon indicating copy to clipboard operation
boulder copied to clipboard

Name ID tool

Open mcpherrinm opened this issue 2 months ago • 4 comments

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())
}

mcpherrinm avatar May 02 '24 19:05 mcpherrinm

Would it be equivalently helpful for it to be in the sre-tools tree?

aarongable avatar May 03 '24 17:05 aarongable

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.

mcpherrinm avatar May 03 '24 17:05 mcpherrinm

Yeah, makes sense. Boulder just doesn't really have a "random scripts and tools" directory right now, at least not for go code.

aarongable avatar May 03 '24 18:05 aarongable

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.

mcpherrinm avatar May 03 '24 18:05 mcpherrinm