func()

in ccadb2OneCRL/onecrl/onecrl.go [79:98]


func (r *Record) IssuerSerial() *set.IssuerSerial {
	issuer, err := r.parseIssuer()
	if err != nil {
		log.WithError(err).
			WithField("record", r).
			Warn("failed to parse an issuer field from OneCRL")
		return nil
	}
	// Decoding and re-encoding the string coerces everyone to the same b64 standard.
	// That is, those without padding get forced into having padding.
	serial, err := utils.B64Decode(r.SerialNumber)
	if err != nil {
		log.WithError(err).
			WithField("record", r).
			Warn("OneCRL serial base64 serial decode error")
		return nil
	}
	is := set.NewIssuerSerial(issuer, serial)
	return &is
}