...

Source file src/github.com/secure-systems-lab/go-securesystemslib/signerverifier/signerverifier.go

Documentation: github.com/secure-systems-lab/go-securesystemslib/signerverifier

     1  package signerverifier
     2  
     3  import (
     4  	"errors"
     5  )
     6  
     7  var KeyIDHashAlgorithms = []string{"sha256", "sha512"}
     8  
     9  var (
    10  	ErrNotPrivateKey               = errors.New("loaded key is not a private key")
    11  	ErrSignatureVerificationFailed = errors.New("failed to verify signature")
    12  	ErrUnknownKeyType              = errors.New("unknown key type")
    13  	ErrInvalidThreshold            = errors.New("threshold is either less than 1 or greater than number of provided public keys")
    14  	ErrInvalidKey                  = errors.New("key object has no value")
    15  )
    16  
    17  const (
    18  	PublicKeyPEM  = "PUBLIC KEY"
    19  	PrivateKeyPEM = "PRIVATE KEY"
    20  )
    21  
    22  type SSLibKey struct {
    23  	KeyIDHashAlgorithms []string `json:"keyid_hash_algorithms"`
    24  	KeyType             string   `json:"keytype"`
    25  	KeyVal              KeyVal   `json:"keyval"`
    26  	Scheme              string   `json:"scheme"`
    27  	KeyID               string   `json:"keyid"`
    28  }
    29  
    30  type KeyVal struct {
    31  	Private     string `json:"private,omitempty"`
    32  	Public      string `json:"public,omitempty"`
    33  	Certificate string `json:"certificate,omitempty"`
    34  	Identity    string `json:"identity,omitempty"`
    35  	Issuer      string `json:"issuer,omitempty"`
    36  }
    37  

View as plain text