code: func NewSigner(priv crypto.Signer, cert *x509.Certificate, sigAlgo x509.SignatureAlgorithm, policy *config.Signing) (*Signer, error) {
  	if policy == nil {
  		policy = &config.Signing{
  			Profiles: map[string]*config.SigningProfile{},
  			Default:  config.DefaultConfig()}
  	}
  
  	if !policy.Valid() {
  		return nil, cferr.New(cferr.PolicyError, cferr.InvalidPolicy)
  	}
  
  	return &Signer{
  		ca:      cert,
  		priv:    priv,
  		sigAlgo: sigAlgo,
  		policy:  policy,
  	}, nil
  }
docs: // NewSigner creates a new Signer directly from a
  // private key and certificate, with optional policy.