in toolkit/certificates/certoperator/cert_operator.go [53:60]
func (o *certOperatorImp) pemToCertificate(ctx context.Context, raw string) (*x509.Certificate, error) {
cpb, _ := pem.Decode([]byte(raw))
if cpb == nil {
log.MustGetLogger(ctx).Errorf(ctx, "Decode returns nil")
return nil, errors.New("The raw pem is not a valid PEM formatted block")
}
return x509.ParseCertificate(cpb.Bytes)
}