testsuite

package
v0.0.0-...-fb9e8e8 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2016 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCertificateChain

func CreateCertificateChain(requests []csr.CertificateRequest) (certChain []byte, key []byte, err error)

CreateCertificateChain creates a chain of certificates from a slice of requests. The first request is the root certificate and the last is the leaf. The chain is returned as a slice of PEM-encoded bytes.

func CreateSelfSignedCert

func CreateSelfSignedCert(request csr.CertificateRequest) (encodedCert, encodedKey []byte, err error)

CreateSelfSignedCert creates a self-signed certificate from a certificate request. This function just calls the CLI "gencert" command.

func SignCertificate

func SignCertificate(request csr.CertificateRequest, signerCert, signerKey []byte) (encodedCert, encodedKey []byte, err error)

SignCertificate uses a certificate (input as signerCert) to create a signed certificate for the input request.

Types

type CFSSLServer

type CFSSLServer struct {
	// contains filtered or unexported fields
}

CFSSLServer is the type returned by StartCFSSLServer. It serves as a handle to a running CFSSL server.

func StartCFSSLServer

func StartCFSSLServer(address string, portNumber int, serverData CFSSLServerData) (*CFSSLServer, error)

StartCFSSLServer creates a local server listening on the given address and port number. Both the address and port number are assumed to be valid.

func (*CFSSLServer) Kill

func (server *CFSSLServer) Kill() error

Kill a running CFSSL server.

type CFSSLServerData

type CFSSLServerData struct {
	CA        []byte
	CABundle  []byte
	CAKey     []byte
	IntBundle []byte
}

CFSSLServerData is the data with which a server is initialized. These fields can be left empty if desired. Any empty fields passed in to StartServer will lead to the server being initialized with the default values defined by the 'cfssl serve' command.

Jump to

Keyboard shortcuts

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