license

package module
v0.0.0-...-a729a75 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: Apache-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

license

CA and licensing tools

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeTLSCert

func MakeTLSCert(license License) (*tls.Certificate, error)

MakeTLSCert takes the provided license and makes a TLS certificate which is the format used by Go servers

func MakeTLSConfig

func MakeTLSConfig(license License) (*tls.Config, error)

MakeTLSConfig builds a client TLS config from the supplied license

func SplitPEM

func SplitPEM(pemData []byte) (certPEM []byte, keyPEM []byte, err error)

SplitPEM splits the provided PEM data that contains concatenated cert and key (in any order) into cert PEM and key PEM respectively. Returns an error if any of them is missing

Types

type License

type License struct {
	// Cert is the x509 license certificate
	Cert *x509.Certificate
	// RawPayload contains raw license payload
	RawPayload []byte
	// CertPEM is the certificate part of the license in PEM format
	CertPEM []byte
	// KeyPEM is the private key part of the license in PEM Format,
	// may be empty if the license was parsed from certificate only
	KeyPEM []byte
}

License represents Gravitational license

func ParseLicensePEM

func ParseLicensePEM(pem []byte) (*License, error)

ParseLicensePEM parses license PEM, parses payload on demand

func ParseX509

func ParseX509(cert *x509.Certificate) (*License, error)

ParseX509 parses the license from the provided x509 certificate

func (*License) Verify

func (l *License) Verify(caPEM []byte) error

Verify makes sure the license is valid

Directories

Path Synopsis
package authority implements X509 certificate authority features
package authority implements X509 certificate authority features

Jump to

Keyboard shortcuts

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