generate

package
v0.0.0-...-8312e71 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendAnonymizationKey

func AppendAnonymizationKey(licenseContents []byte) ([]byte, error)

AppendAnonymizationKey generates and appends new anonymization key (if one does not already exist) to the existing certificate keypair in PEM format.

func NewLicense

func NewLicense(info NewLicenseInfo) (string, error)

NewLicense generates a new license according to the provided request

func NewPrivateKey

func NewPrivateKey() (*rsa.PrivateKey, error)

NewPrivateKey generates and returns private key

Types

type NewLicenseInfo

type NewLicenseInfo struct {
	// ValidFor is validity period for the license
	ValidFor time.Duration
	// PrivateKey is the private key part of the license
	PrivateKey *rsa.PrivateKey
	// TLSKeyPair is the certificate authority to sign the license with
	TLSKeyPair authority.TLSKeyPair
	// Payload is the license payload
	Payload []byte
}

NewLicenseInfo encapsulates fields needed to generate a license

func (*NewLicenseInfo) Check

func (i *NewLicenseInfo) Check() error

Check checks the new license request

Jump to

Keyboard shortcuts

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