Documentation
¶
Index ¶
- func ConcatPEMs(pems ...[]byte) []byte
- func CreateIntermediateCA(commonName string, validFor time.Duration, now time.Time, ...) ([]byte, *ecdsa.PrivateKey, *x509.Certificate, error)
- func CreateRootCA(commonName string, validFor time.Duration, now time.Time) ([]byte, *ecdsa.PrivateKey, *x509.Certificate, error)
- func CreateServerCSR(commonName, serverName string) ([]byte, []byte, *x509.CertificateRequest, error)
- func CreateServerCSRWithKey(commonName, serverName string, key *ecdsa.PrivateKey) ([]byte, *x509.CertificateRequest, error)
- func GenerateECDSAKey() (*ecdsa.PrivateKey, error)
- func IssueClientCertificate(commonName string, validFor time.Duration, now time.Time, ...) ([]byte, []byte, *x509.Certificate, error)
- func LoadKeyPair(certPath, keyPath string) (tls.Certificate, error)
- func MarshalECDSAPrivateKeyPEM(key *ecdsa.PrivateKey) ([]byte, error)
- func ParseCertificatePEM(data []byte) (*x509.Certificate, error)
- func ParseCertificateRequestPEM(data []byte) (*x509.CertificateRequest, error)
- func ParseECDSAPrivateKeyPEM(data []byte) (*ecdsa.PrivateKey, error)
- func ReadCertificate(path string) (*x509.Certificate, error)
- func ReadCertificateRequest(path string) (*x509.CertificateRequest, error)
- func ReadECDSAPrivateKey(path string) (*ecdsa.PrivateKey, error)
- func SignServerCSR(csr *x509.CertificateRequest, validFor time.Duration, now time.Time, ...) ([]byte, *x509.Certificate, error)
- func WritePEMFile(path string, data []byte, perm os.FileMode) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConcatPEMs ¶
func CreateIntermediateCA ¶
func CreateIntermediateCA(commonName string, validFor time.Duration, now time.Time, parent *x509.Certificate, parentKey crypto.Signer) ([]byte, *ecdsa.PrivateKey, *x509.Certificate, error)
func CreateRootCA ¶
func CreateServerCSR ¶
func CreateServerCSRWithKey ¶
func CreateServerCSRWithKey(commonName, serverName string, key *ecdsa.PrivateKey) ([]byte, *x509.CertificateRequest, error)
func GenerateECDSAKey ¶
func GenerateECDSAKey() (*ecdsa.PrivateKey, error)
func IssueClientCertificate ¶
func LoadKeyPair ¶
func LoadKeyPair(certPath, keyPath string) (tls.Certificate, error)
func MarshalECDSAPrivateKeyPEM ¶
func MarshalECDSAPrivateKeyPEM(key *ecdsa.PrivateKey) ([]byte, error)
func ParseCertificatePEM ¶
func ParseCertificatePEM(data []byte) (*x509.Certificate, error)
func ParseCertificateRequestPEM ¶
func ParseCertificateRequestPEM(data []byte) (*x509.CertificateRequest, error)
func ParseECDSAPrivateKeyPEM ¶
func ParseECDSAPrivateKeyPEM(data []byte) (*ecdsa.PrivateKey, error)
func ReadCertificate ¶
func ReadCertificate(path string) (*x509.Certificate, error)
func ReadCertificateRequest ¶
func ReadCertificateRequest(path string) (*x509.CertificateRequest, error)
func ReadECDSAPrivateKey ¶
func ReadECDSAPrivateKey(path string) (*ecdsa.PrivateKey, error)
func SignServerCSR ¶
func SignServerCSR(csr *x509.CertificateRequest, validFor time.Duration, now time.Time, issuer *x509.Certificate, issuerKey crypto.Signer, chainPEMs ...[]byte) ([]byte, *x509.Certificate, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.