code: func Regenerate(priv crypto.Signer, csr []byte) ([]byte, error) {
  	req, extra, err := helpers.ParseCSR(csr)
  	if err != nil {
  		return nil, err
  	} else if len(extra) > 0 {
  		return nil, errors.New("csr: trailing data in certificate request")
  	}
  
  	return x509.CreateCertificateRequest(rand.Reader, req, priv)
  }
docs: // Regenerate uses the provided CSR as a template for signing a new
  // CSR using priv.