certs

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package certs provides splice provisioning support for certificate generation, lookup and verification during the provisioning process.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateSelfSignedCert

func GenerateSelfSignedCert(cn string, notBefore, notAfter time.Time) ([]byte, *rsa.PrivateKey, error)

GenerateSelfSignedCert generates a self-signed certificate using a template and returns the certificate in DER format and its key.

func PublicKey

func PublicKey(c []byte) ([]byte, error)

PublicKey takes a raw DER encoded cert, and returns only the public key portion of the certificate in DER format.

func VerifyCert

func VerifyCert(c []byte, hostname, base, path, caOrg, roots string, verify bool) error

VerifyCert takes a raw DER encoded cert, verifies that it is valid and optionally attempts to verify its certificate chain. It returns the DER encoded public key of the certificate.

Types

This section is empty.

Jump to

Keyboard shortcuts

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