Documentation ¶
Overview ¶
Package pwnedkeys looks up Certificates, Certificate requests, Keys, etc in the pwnedkeys.com database.
Lookup is done using the SubjectPublicKeyInfo (SPKI) associated with a key. The SPKI fingerprint of a key (or certificate) is the all-lowercase hex-encoded SHA-256 hash of the DER-encoded form of the subjectPublicKeyInfo ASN.1 structure representing a given public key.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrKeyFound is returned when the key was found in pwnedkeys.com database ErrKeyFound = errors.New("private key found in pwnedkeys.com database") // ErrHashFailed is returned only when the SHA-256 hashing fails. ErrHashFailed = errors.New("unable to generate SHA-256 hash") )
Functions ¶
func CheckCertificate ¶
func CheckCertificate(client *http.Client, cert *x509.Certificate) error
CheckCertificate returns a ErrKeyFound if the key information is found in the pwnedkeys.com database. Finding key data implies a compromised key.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.