MCPcopy Create free account
hub / github.com/0xUnixIO/pulse / randomSerial

Function randomSerial

internal/cert/ca.go:174–181  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

172}
173
174func randomSerial() (*big.Int, error) {
175 limit := new(big.Int).Lsh(big.NewInt(1), 128)
176 n, err := rand.Int(rand.Reader, limit)
177 if err != nil {
178 return nil, fmt.Errorf("generate serial number: %w", err)
179 }
180 return n, nil
181}
182
183// SignCSR signs the given PEM-encoded CSR producing a node client certificate
184// whose CommonName is forced to nodeID. The CSR's self-reported subject is not

Callers 3

createNodeCAFunction · 0.85
SignCSRMethod · 0.85
IssueServerCertMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected