func (c *ca) CertBytes() []byte {
	return c.caCert.Cert
}
CertBytes returns the certificate of the CA in PEM encoding
package tlsgen
import (
	"crypto"
	"crypto/x509"
)
type CertKeyPair struct {
	Cert []byte
	Key []byte
	crypto.Signer
	TLSCert *x509.Certificate
}
type CA interface {
	CertBytes() []byte
	NewClientCertKeyPair() (*CertKeyPair, error)
	NewServerCertKeyPair(host string) (*CertKeyPair, error)
}
type ca struct {
	caCert *CertKeyPair
}
func NewCA() (CA, error) {
	c := &ca{}
	var err error
	c.caCert, err = newCertKeyPair(true, false, "", nil, nil)
	if err != nil {
		return nil, err
	}
	return c, nil
}