tlskp

package
v0.0.0-...-27520ef Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2020 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetKeyPrints

func GetKeyPrints(c *tls.Conn) []string

GetKeyPrints returns keyprints of all certificates provided by a peer on a given TLS connection.

func VerifyKeyPrint

func VerifyKeyPrint(c *tls.Conn, kp string) ([]string, error)

VerifyKeyPrint checks if a given keyprint matches any certificates provided by the peer on a given TLS connection. It also returns all keyprints for peer certificates.

Types

type ErrInvalidKeyPrint

type ErrInvalidKeyPrint struct {
	Expected string
	Actual   []string
}

ErrInvalidKeyPrint is returned when an expected keyprint doesn't match any of the peer certificates.

func (*ErrInvalidKeyPrint) Error

func (e *ErrInvalidKeyPrint) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL