Standard library / crypto/x509
crypto/x509.RevocationListEntry
One revoked serial number with RevocationTime, ReasonCode and optional extensions; serial is scoped to issuer. Zero ReasonCode denotes unspecified. Expected stdout: '7\n'.
Formal Syntax & Structure
go syntaxgo
type RevocationListEntry struct { Raw []byte
SerialNumber *big.Int RevocationTime time.Time ReasonCode int
Extensions []pkix.Extension ExtraExtensions []pkix.Extension}Working Example
Example Snippetgo
package main
import ( "crypto/x509" "fmt" "math/big" "time")
func main() { e := x509.RevocationListEntry{SerialNumber: big.NewInt(7), RevocationTime: time.Unix(100, 0)} fmt.Println(e.SerialNumber.Int64())}
func must[T any](v T, e error) T { if e != nil { panic(e) } return v}func check(e error) { if e != nil { panic(e) }}