Documentation ¶
Index ¶
- Variables
- func GetAppPublicKey(license *kotsv1beta1.License) ([]byte, error)
- func GetLatestLicenseField(license *kotsv1beta1.License, fieldName string) (*types.LicenseField, error)
- func GetLatestLicenseFields(license *kotsv1beta1.License) (types.LicenseFields, error)
- func LicenseIsExpired(license *kotsv1beta1.License) (bool, error)
- func LoadLicenseFromBytes(data []byte) (*kotsv1beta1.License, error)
- func LoadLicenseFromPath(licenseFilePath string) (*kotsv1beta1.License, error)
- func Verify(message, signature, publicKeyPEM []byte) error
- func VerifySignature(license *kotsv1beta1.License) (*kotsv1beta1.License, error)
- type InnerSignature
- type KeySignature
- type LicenseData
- type LicenseDataError
- type OuterSignature
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrSignatureInvalid = errors.New("signature is invalid") ErrSignatureMissing = errors.New("signature is missing") )
View Source
var PublicKeys = map[string][]byte{ "1d3f7f6b50714fe7b895554dd65773b0": []byte(`-----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAugyKfZV2gIDaY1Rzkjoo fbNywGa04sGQIAqYwifMay2e2xzqRwswTRHQnr9SIWypkN86Cfn6QzOB8kkjERC1 DPNdsiKdjBFdcLaxxdyHgrXLgfdzhh6We+Lpq19JT5LCK3PXleZgt/a0aRBpIc1l xKs57d8MTWUTVh3W3WYi6LbqAPScdmSiG7A145HhKXmmtZFEv4puE5dKmS5lkV2d VU789XWrNFk74FKKHVwYMdppqAabB6cRBmU8YFiVEULOn+d1FtKRbO/vv/fbA9nX PUG/1PgEQHogP+3cC4J7b7s9+kBmtHkpSq9x+OUu/5B+nT21dooS6adfQiI8iB/+ NQIDAQAB -----END PUBLIC KEY-----`), "bdee56560cfb43c9b28bf98eacafa646": []byte(`-----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwdSHE8v64QH/yELBoPBl GanhS3AD5vMAaqLLFnftwjmDKrxWwqNB9w1GVJWb5gVLvt/UlE/k+HVr5HFdomVI TMvnvxhD0UvNyGFuUbXBMvQPPW9joR48LcCBLZl+RZTqR5HRhsIbujiExRDnteaq mU1jG/oVlQkRoyOYrObTeoD0BdcZAr2PdGvgvJvpZduZtrKvjvsSJEBYExoPtko+ 8AqhMBAI+qX1/SMix21qpmYSYLNeqN2Pplna0p2MK8yyaHY8KSqTF90ZJF1+P0ZF MLt6S8/6PIX9WD+vFqmDpW1GCkB+p2OfxsYiAIX1ej98Ck3hoPQnOuiFIovV8aFQ bQIDAQAB -----END PUBLIC KEY-----`), "de2c275656d04b1bb0f15cf70f0ea2a2": []byte(`-----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2hHg1HER6NYlsqBs+B+B txibtctT6YB5kxgE1sz7UmVnlcLs+Olc4OZJwD4vLsEU60SVW0HRoTfaGaradv0R GUIxlFRSOnzjZEMkm/YKL3sdPQigi2m9O0P5tC9LQvzk49dFg5HJxiLODCgWwJ9g q3pGs8OaAc0dop/tqUE7WqQfHLWJdTPP5pVDLDWybfAO4OmgVmx+oVXdCfMVlOzu num6SOF+eBuERXQGbEfnd6eSRVokWhfMCfXNPTYtq14DaK9tvX4uzHsub+Asn6UN OBIAESJntpZfdDDrNqbfOQYql2rqx1lJtU7lVFbTQTkKhj4teInEGO6FvLzy0UE9 swIDAQAB -----END PUBLIC KEY-----`), }
Functions ¶
func GetAppPublicKey ¶
func GetAppPublicKey(license *kotsv1beta1.License) ([]byte, error)
func GetLatestLicenseField ¶
func GetLatestLicenseField(license *kotsv1beta1.License, fieldName string) (*types.LicenseField, error)
func GetLatestLicenseFields ¶
func GetLatestLicenseFields(license *kotsv1beta1.License) (types.LicenseFields, error)
func LicenseIsExpired ¶
func LicenseIsExpired(license *kotsv1beta1.License) (bool, error)
func LoadLicenseFromBytes ¶
func LoadLicenseFromBytes(data []byte) (*kotsv1beta1.License, error)
func LoadLicenseFromPath ¶
func LoadLicenseFromPath(licenseFilePath string) (*kotsv1beta1.License, error)
func VerifySignature ¶
func VerifySignature(license *kotsv1beta1.License) (*kotsv1beta1.License, error)
Types ¶
type InnerSignature ¶
type KeySignature ¶
type LicenseData ¶
type LicenseData struct { LicenseBytes []byte License *kotsv1beta1.License }
func GetLatestLicense ¶
func GetLatestLicense(license *kotsv1beta1.License) (*LicenseData, error)
type LicenseDataError ¶
type LicenseDataError struct {
// contains filtered or unexported fields
}
func (LicenseDataError) Error ¶
func (e LicenseDataError) Error() string
type OuterSignature ¶
Click to show internal directories.
Click to hide internal directories.