Documentation ¶
Index ¶
- func AddPrivateKeyToCert(certInput io.Reader, privKeyInput io.Reader, certOutput io.Writer) error
- func CreateAnchorCert(template *x509.Certificate, certOutput io.Writer, caCertOutput io.Writer) error
- func CreateCSR(template *x509.CertificateRequest, csrOutput io.Writer, ...) error
- func CreateCert(template *x509.Certificate, anchorCert []byte, certOutput io.Writer) error
- func CreateCertFromCSR(role ssntp.Role, csr []byte, anchorCert []byte, certOutput io.Writer) error
- func CreateCertTemplate(role ssntp.Role, organization string, email string, hosts []string, ...) (*x509.Certificate, error)
- func CreateCertificateRequest(organization string, email string, hosts []string, mgmtIPs []string) *x509.CertificateRequest
- func FingerPrint(c interface{}) string
- func VerifyCert(bytesAnchorCert, bytesCert []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddPrivateKeyToCert ¶
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 ¶
CreateCert creates the certificate signed by the giver trust anchor certificate. It is written PEM encoded.
func CreateCertFromCSR ¶
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 ¶
VerifyCert verifies that bytesCert is valid in terms of the CA in bytesAnchorCert
Types ¶
This section is empty.