Documentation ¶
Index ¶
- func TlsLeaf(cert *tls.Certificate) *x509.Certificate
- type CertGen
- func LoadCertGen(certBytes, keyBytes []byte) (*CertGen, error)
- func MakeCaTls(bits int, name pkix.Name, serialNumber *big.Int, future Future) (*CertGen, error)
- func MakeClientTls(ca *CertGen, bits int, name pkix.Name, serialNumber *big.Int, future Future) (*CertGen, error)
- func MakeServerTls(ca *CertGen, bits int, name pkix.Name, serialNumber *big.Int, future Future, ...) (*CertGen, error)
- type Future
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TlsLeaf ¶
func TlsLeaf(cert *tls.Certificate) *x509.Certificate
Types ¶
type CertGen ¶
type CertGen struct {
// contains filtered or unexported fields
}
func LoadCertGen ¶
func MakeClientTls ¶
func MakeClientTls(ca *CertGen, bits int, name pkix.Name, serialNumber *big.Int, future Future) (*CertGen, error)
MakeClientTls generates a client TLS certificate using a CA to sign it If ca is nil then the client will sign its own certificate
func MakeServerTls ¶
func MakeServerTls(ca *CertGen, bits int, name pkix.Name, serialNumber *big.Int, future Future, dnsNames []string, ipAddresses []net.IP) (*CertGen, error)
MakeServerTls generates a server TLS certificate using a CA to sign it If ca is nil then the server will sign its own certificate dnsNames and ipAddresses can be nil if they are not required on the certificate
func (*CertGen) GetCertPem ¶
func (*CertGen) GetTlsLeaf ¶
func (ca *CertGen) GetTlsLeaf() tls.Certificate
Click to show internal directories.
Click to hide internal directories.