MCPcopy Create free account
hub / github.com/cli/cli / randomSerial

Function randomSerial

script/ghmock/tls.go:69–71  ·  view source on GitHub ↗

randomSerial returns a random serial number, so certificates from different runs never share one.

()

Source from the content-addressed store, hash-verified

67// randomSerial returns a random serial number, so certificates from different
68// runs never share one.
69func randomSerial() (*big.Int, error) {
70 return rand.Int(rand.Reader, new(big.Int).Lsh(big.NewInt(1), 127))
71}
72
73// leaf returns a certificate for host signed by the authority, making it the
74// first time it's asked for.

Callers 2

newCertAuthorityFunction · 0.85
leafMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected