Discover Packages
github.com/tedyu/kubernetes
cmd
kubeadm
app
util
pubkeypin
package
Version:
v1.12.2-beta.0
Opens a new window with list of versions in this module.
Published: Oct 5, 2018
License: Apache-2.0
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation Source Files Overview Index Constants Variables Functions Types Hash(certificate) type Set NewSet() (s) Allow(pubKeyHashes) (s) Check(certificate) (s) Empty()
Documentation
¶
Package pubkeypin provides primitives for x509 public key pinning in the
style of RFC7469.
func Hash (certificate *x509.Certificate) string
Hash calculates the SHA-256 hash of the Subject Public Key Information (SPKI)
object in an x509 certificate (in DER encoding). It returns the full hash as a
hex encoded string (suitable for passing to Set.Allow).
Set is a set of pinned x509 public keys.
NewSet returns a new, empty PubKeyPinSet
func (s *Set) Allow(pubKeyHashes ...string ) error
Allow adds an allowed public key hash to the Set
func (s *Set) Check(certificate *x509.Certificate) error
Check if a certificate matches one of the public keys in the set
func (s *Set) Empty() bool
Empty returns true if the Set contains no pinned public keys.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.