Documentation ¶
Index ¶
- func CreateCa(organization string, expireDays int) (certBytes []byte, keyBytes []byte, err error)
- func CreateCaToFile(name, domainOrIP string, expireDays int) (err error)
- func CreateSignCert(rootCa *x509.Certificate, rootKey *rsa.PrivateKey, domainOrIP string, ...) (certBytes []byte, keyBytes []byte, err error)
- func CreateSignCertToFile(rootCa *x509.Certificate, rootKey *rsa.PrivateKey, domainOrIP string, ...) (err error)
- func ParseCert(certPemFile string) (cert *x509.Certificate, err error)
- func ParseCertAndKey(certPemFile, keyFile string) (cert *x509.Certificate, privateKey *rsa.PrivateKey, err error)
- func ParseCertAndKeyBytes(certPemFileByes, keyFileBytes []byte) (cert *x509.Certificate, privateKey *rsa.PrivateKey, err error)
- func ParseCertBytes(certPemFileBytes []byte) (cert *x509.Certificate, err error)
- func ParseKey(keyFile string) (key *rsa.PrivateKey, err error)
- func ParseKeyBytes(keyFileBytes []byte) (praKey *rsa.PrivateKey, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateCaToFile ¶
func CreateSignCert ¶
func CreateSignCert(rootCa *x509.Certificate, rootKey *rsa.PrivateKey, domainOrIP string, expireDays int) (certBytes []byte, keyBytes []byte, err error)
func CreateSignCertToFile ¶
func CreateSignCertToFile(rootCa *x509.Certificate, rootKey *rsa.PrivateKey, domainOrIP string, expireDays int, name string) (err error)
func ParseCertAndKey ¶
func ParseCertAndKey(certPemFile, keyFile string) (cert *x509.Certificate, privateKey *rsa.PrivateKey, err error)
func ParseCertAndKeyBytes ¶
func ParseCertAndKeyBytes(certPemFileByes, keyFileBytes []byte) (cert *x509.Certificate, privateKey *rsa.PrivateKey, err error)
func ParseCertBytes ¶
func ParseCertBytes(certPemFileBytes []byte) (cert *x509.Certificate, err error)
func ParseKeyBytes ¶
func ParseKeyBytes(keyFileBytes []byte) (praKey *rsa.PrivateKey, err error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.