Documentation ¶
Index ¶
- func ClientTLSConf(caPems ...CAPem) (clientTLSConf *tls.Config)
- func ExampleCACert(ca_data CertData) (CA_X509 x509.Certificate)
- func ExampleTLSCert(ca_data CertData) (CA_X509 x509.Certificate)
- func GetSubject(cd CertData) pkix.Name
- func ServerTLSConf(serverCert tls.Certificate) (serverTLSConf *tls.Config)
- type CAPem
- type CertData
- type NotAfterStruct
- type TLSCert
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientTLSConf ¶
func ExampleCACert ¶
func ExampleCACert(ca_data CertData) (CA_X509 x509.Certificate)
func ExampleTLSCert ¶
func ExampleTLSCert(ca_data CertData) (CA_X509 x509.Certificate)
func GetSubject ¶
func ServerTLSConf ¶
func ServerTLSConf(serverCert tls.Certificate) (serverTLSConf *tls.Config)
Types ¶
type CAPem ¶
type CAPem struct { X509 x509.Certificate `json:"x509"` PrivKey *rsa.PrivateKey `json:"priv_key"` Cert []byte `json:"ca"` PEM []byte `json:"pem"` PrivKeyPEM []byte `json:"priv_key_pem"` }
func GenerateCAPem ¶
func GenerateCAPem(X509_ x509.Certificate) (caPem CAPem, err error)
type CertData ¶
type CertData struct { Organization string `json:"organisation"` Country string `json:"country"` Province string `json:"province"` Locality string `json:"locality"` StreetAddress string `json:"street_address"` PostalCode string `json:"postal_code"` NotAfter NotAfterStruct `json:"add_date"` IPAddrresses []net.IP `json:"ip_addresses"` }
type NotAfterStruct ¶
type TLSCert ¶
type TLSCert struct { CAPem TlsCert tls.Certificate `json:"tls_cert"` }
func GenerateTLSCert ¶
func GenerateTLSCert(ca_pem *CAPem, X509_ x509.Certificate) (tls_cert *TLSCert, err error)
Click to show internal directories.
Click to hide internal directories.