package localca
import "github.com/cloudflare/cfssl/transport/ca/localca"
Package localca implements a localca that is useful for testing the transport package. To use the localca, see the New and Load functions.
Index ¶
- func ExampleRequest() *csr.CertificateRequest
- func ExampleSigningConfig() *config.Signing
- func Load(lca *CA, profiles *config.Signing) (err error)
- type CA
Functions ¶
func ExampleRequest ¶
func ExampleRequest() *csr.CertificateRequest
ExampleRequest can be used as a sample request, or the returned request can be modified.
func ExampleSigningConfig ¶
ExampleSigningConfig returns a sample config.Signing with only a default profile.
func Load ¶
Load reads the key and certificate from the files specified in the CA.
Types ¶
type CA ¶
type CA struct { // Label and Profile are used to select the CFSSL signer // components if they should be anything but the default. Label string `json:"label"` Profile string `json:"profile"` // The KeyFile and CertFile are required when using Load to // construct a CA. KeyFile string `json:"private_key,omitempty"` CertFile string `json:"certificate,omitempty"` // contains filtered or unexported fields }
CA is a local transport CertificateAuthority that is useful for tests.
func New ¶
New generates a new CA from a certificate request and signing profile.
func NewFromSigner ¶
NewFromSigner constructs a local CA from a CFSSL signer.
func (*CA) CACertificate ¶
CACertificate returns the certificate authority's certificate.
func (*CA) SignCSR ¶
SignCSR submits a PKCS #10 certificate signing request to a CA for signing.
func (*CA) Toggle ¶
func (lca *CA) Toggle()
Toggle switches the CA between operable mode and inoperable mode. This is useful in testing to verify behaviours when a CA is unavailable.
Source Files ¶
- Version
- v1.4.0
- Published
- Oct 31, 2019
- Platform
- js/wasm
- Imports
- 11 packages
- Last checked
- 20 hours ago –
Tools for package owners.