code: func parseCertificateRequest(priv crypto.Signer, csrBytes []byte) (template *x509.Certificate, err error) {
  
  	csr, err := x509.ParseCertificateRequest(csrBytes)
  	if err != nil {
  		err = cferr.Wrap(cferr.CSRError, cferr.ParseFailed, err)
  		return
  	}
  
  	csr.CheckSignature()
  	if err != nil {
  		err = cferr.Wrap(cferr.CSRError, cferr.KeyMismatch, err)
  		return
  	}
  
  	template = &x509.Certificate{
  		Subject:            csr.Subject,
  		PublicKeyAlgorithm: csr.PublicKeyAlgorithm,
  		PublicKey:          csr.PublicKey,
  		SignatureAlgorithm: signer.DefaultSigAlgo(priv),
  	}
  
  	return
  }
docs: // parseCertificateRequest takes an incoming certificate request and
  // builds a certificate template from it.