• Matt Moyer's avatar
    kubeadm: add pubkeypin package (public key pinning hash implementation). · 2dd359ba
    Matt Moyer authored
    This change adds a `k8s.io/kubernetes/cmd/kubeadm/app/util/pubkeypin` package which implements x509 public key pinning in the style of RFC7469. This is the public key hash format used by the new `kubeadm join --discovery-token-ca-cert-hash` flag.
    
    Hashes are namespaced with a short type, with "sha256" being the only currently-supported format. Type "sha256" is a hex-encoded SHA-256 hash over the Subject Public Key Info (SPKI) object in DER-encoded ASN.1.
    2dd359ba
pubkeypin_test.go 5.58 KB