certs

package
v0.0.0-...-194264a Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2018 License: Apache-2.0 Imports: 16 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPrivateKeyToCert

func AddPrivateKeyToCert(certInput io.Reader, privKeyInput io.Reader, certOutput io.Writer) error

AddPrivateKeyToCert adds a private key to existing certificate (created from signing a CSR)

func CreateAnchorCert

func CreateAnchorCert(template *x509.Certificate, certOutput io.Writer, caCertOutput io.Writer) error

CreateAnchorCert creates the trust anchor certificate and the CA certificate. Both are written out PEM encoded.

func CreateCSR

func CreateCSR(template *x509.CertificateRequest, csrOutput io.Writer, privKeyOutput io.Writer) error

CreateCSR creates a CSR from the incoming template for a newly generated private key.

func CreateCert

func CreateCert(template *x509.Certificate, anchorCert []byte, certOutput io.Writer) error

CreateCert creates the certificate signed by the giver trust anchor certificate. It is written PEM encoded.

func CreateCertFromCSR

func CreateCertFromCSR(role ssntp.Role, csr []byte, anchorCert []byte, certOutput io.Writer) error

CreateCertFromCSR creates a certificate from a CSR signed by the given anchor certificate. It is written in PEM format.

func CreateCertTemplate

func CreateCertTemplate(role ssntp.Role, organization string, email string, hosts []string, mgmtIPs []string) (*x509.Certificate, error)

CreateCertTemplate provides the certificate template from which trust anchor or derivative certificates can be derived.

func CreateCertificateRequest

func CreateCertificateRequest(organization string, email string, hosts []string, mgmtIPs []string) *x509.CertificateRequest

CreateCertificateRequest creates a certificate request template from the supplied details.

func FingerPrint

func FingerPrint(c interface{}) string

FingerPrint returns the SHA-256 fingerprint of the public key

func VerifyCert

func VerifyCert(bytesAnchorCert, bytesCert []byte) error

VerifyCert verifies that bytesCert is valid in terms of the CA in bytesAnchorCert

Types

This section is empty.

Jump to

Keyboard shortcuts

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