Documentation
¶
Index ¶
- func Contains(elem string, list []string) bool
- func ExtendSha256(hash []byte, data []byte) []byte
- func ExtendSha384(hash []byte, data []byte) []byte
- func FileExists(f string) bool
- func FlagPassed(name string) bool
- func GetNetworkAndAddr(addr string) (string, string, error)
- 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 ExtendSha256 ¶ added in v0.8.0
ExtendSha256 performs the extend operation Digest = HASH(Digest | Data) using the SHA256 hashing algorithm, as performed e.g. by Trusted Platform Modules (TPMs)
func ExtendSha384 ¶ added in v0.8.0
ExtendSha256 performs the extend operation Digest = HASH(Digest | Data) using the SHA256 hashing algorithm, as performed e.g. by Trusted Platform Modules (TPMs)
func FileExists ¶ added in v0.6.0
func FlagPassed ¶ added in v0.6.0
func GetNetworkAndAddr ¶ added in v0.8.0
Tests if the address is a network address in the form ip:port. In this case, returns "tcp" to be used as the transport layer, otherwise assumes that the address is a unix domain socket
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.