Documentation ¶
Index ¶
- func Contains(elem string, list []string) bool
- func FileExists(f string) bool
- func FlagPassed(name string) bool
- func ParseCert(data []byte) (*x509.Certificate, error)
- func ParseCertsDer(data any) ([]*x509.Certificate, error)
- func ParseCertsPem(data any) ([]*x509.Certificate, error)
- func PrintTlsConfig(conf *tls.Config, roots []byte) error
- func VerifyCertChain(certs []*x509.Certificate, cas []*x509.Certificate) ([][]*x509.Certificate, error)
- func WriteCertPem(cert *x509.Certificate) []byte
- func WriteCertsDer(certs []*x509.Certificate) [][]byte
- func WriteCertsPem(certs []*x509.Certificate) [][]byte
- func WritePublicKeyPem(key crypto.PublicKey) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileExists ¶ added in v0.6.0
func FlagPassed ¶ added in v0.6.0
func ParseCert ¶ added in v0.6.0
func ParseCert(data []byte) (*x509.Certificate, error)
ParseCert parses a certificate from PEM or DER encoded data into an X.509 certificate
func ParseCertsDer ¶ added in v0.6.0
func ParseCertsDer(data any) ([]*x509.Certificate, error)
ParseCertsDer parses DER encoded certificates
func ParseCertsPem ¶ added in v0.6.0
func ParseCertsPem(data any) ([]*x509.Certificate, error)
ParseCertsPem parses certificates in a single PEM encoded blob or a list of PEM encoded blobs into a list of X.509 certificates
func VerifyCertChain ¶ added in v0.6.0
func VerifyCertChain(certs []*x509.Certificate, cas []*x509.Certificate) ([][]*x509.Certificate, error)
verifyCertChain tries to verify the certificate chain certs with leaf certificate first up to one of the root certificates in cas
func WriteCertPem ¶ added in v0.6.0
func WriteCertPem(cert *x509.Certificate) []byte
func WriteCertsDer ¶ added in v0.6.0
func WriteCertsDer(certs []*x509.Certificate) [][]byte
func WriteCertsPem ¶ added in v0.6.0
func WriteCertsPem(certs []*x509.Certificate) [][]byte
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.