Documentation
¶
Overview ¶
Package pki is the private certificate authority of the central: server and edge certificates, and the fingerprint edges pin.
Index ¶
- func CSR(key crypto.Signer) ([]byte, error)
- func CertPEM(der []byte) []byte
- func EdgeID(cert *x509.Certificate) (uuid.UUID, error)
- func Fingerprint(cert *x509.Certificate) string
- func KeyPEM(key crypto.Signer) ([]byte, error)
- func NewEdgeKey() (crypto.Signer, []byte, error)
- func ParseCertPEM(b []byte) (*x509.Certificate, error)
- func ParseKeyPEM(b []byte) (crypto.Signer, error)
- type CA
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EdgeID ¶
func EdgeID(cert *x509.Certificate) (uuid.UUID, error)
EdgeID reads the edge identity from a certificate.
func Fingerprint ¶
func Fingerprint(cert *x509.Certificate) string
Fingerprint returns "sha256:<hex>" of the certificate public key.
func NewEdgeKey ¶
NewEdgeKey generates an edge key and its CSR.
func ParseCertPEM ¶
func ParseCertPEM(b []byte) (*x509.Certificate, error)
Types ¶
type CA ¶
type CA struct {
Cert *x509.Certificate
Key crypto.Signer
}
CA is the private authority that signs the central and every edge.
func LoadOrCreateCA ¶
LoadOrCreateCA reads ca.crt and ca.key from dir, or creates them.
func (*CA) Fingerprint ¶
Fingerprint is the value edges pin at enrollment.
Click to show internal directories.
Click to hide internal directories.