Documentation
¶
Overview ¶
Package certs provides utility functions for managing certificates.
Index ¶
- Constants
- func GenCSR(commonName string, pk ed25519.PublicKey, sk ed25519.PrivateKey) ([]byte, error)
- func PEMEncode(bu []byte, blockType string) (*bytes.Buffer, error)
- func ParseCert(certBytes []byte) (*x509.Certificate, error)
- func ParsePk(pkBytes []byte) (crypto.PublicKey, error)
- func ParseSk(skBytes []byte) (crypto.PrivateKey, error)
- func ReadPEM(data []byte) (any, error)
- func ToPEM(obj any) ([]byte, error)
- func X509ToTLS(cert *x509.Certificate, sk ed25519.PrivateKey) tls.Certificate
Constants ¶
View Source
const PemStringDhparams = "DH PARAMETERS"
View Source
const PemStringDsaparams = "DSA PARAMETERS"
View Source
const PemStringEcdsaPublic = "ECDSA PUBLIC KEY"
View Source
const PemStringEcparameters = "EC PARAMETERS"
View Source
const PemStringEcprivatekey = "EC PRIVATE KEY"
View Source
const PemStringEvpPkey = "ANY PRIVATE KEY"
View Source
const PemStringParameters = "PARAMETERS"
View Source
const PemStringPkcs7 = "PKCS7"
View Source
const PemStringPkcs8 = "ENCRYPTED PRIVATE KEY"
View Source
const PemStringPkcs8inf = "PRIVATE KEY"
View Source
const PemStringPublic = "PUBLIC KEY"
View Source
const PemStringRsa = "RSA PRIVATE KEY"
View Source
const PemStringRsaPublic = "RSA PUBLIC KEY"
View Source
const PemStringSslSession = "SSL SESSION PARAMETERS"
View Source
const PemStringX509 = "CERTIFICATE"
View Source
const PemStringX509Crl = "X509 CRL"
View Source
const PemStringX509Old = "X509 CERTIFICATE"
View Source
const PemStringX509Req = "CERTIFICATE REQUEST"
Variables ¶
This section is empty.
Functions ¶
func X509ToTLS ¶
func X509ToTLS(cert *x509.Certificate, sk ed25519.PrivateKey) tls.Certificate
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.