func NewDefaultAuthority(authority *x509.Certificate, signer crypto.Signer,
	chain ...*x509.Certificate) (*DefaultAuthority, error) {
	if !authority.IsCA {
		return nil, errors.NotValidf("%s is not a certificate authority",
			authority.Subject)
	}

	return &DefaultAuthority{
		authority: NewDefaultLeaf("", authority, chain, signer),
	}, nil
}
// NewDefaultAuthority generates a new DefaultAuthority for the supplied CA
// cert and keys. Error is returned when the supplied certificate is not a CA.
NewDefaultAuthority generates a new DefaultAuthority for the supplied CA
cert and keys. Error is returned when the supplied certificate is not a CA.
// NewDefaultAuthority generates a new DefaultAuthority for the supplied CA // cert and keys . Error is returned when the supplied certificate is not a CA .
func NewDefaultAuthority(authority *x509.Certificate, signer crypto.Signer,
	chain ...*x509.Certificate) (*DefaultAuthority, error) {
	if !authority.IsCA {
		return nil, errors.NotValidf("%s is not a certificate authority",
			authority.Subject)
	}
	return &DefaultAuthority{
		authority: NewDefaultLeaf("", authority, chain, signer),
	}, nil
}
func NewDefaultAuthority ( authority * x509 . Certificate , signer crypto . Signer , chain ... * x509 . Certificate ) ( * DefaultAuthority , error ) { if ! authority . IsCA { return nil , errors . NotValidf ( " " , authority . Subject ) } return & DefaultAuthority { authority : NewDefaultLeaf ( " " , authority , chain , signer ) , } , nil }
NewDefaultAuthority generates a new DefaultAuthority for the supplied CA
cert and keys.
NewDefaultAuthority generates a new DefaultAuthority for the supplied CA cert and keys .