Documentation ¶
Index ¶
- Constants
- func LoadKey(file string, algo string) (common.RawBytes, error)
- type JSON
- type KeyConf
- type Store
- func (s *Store) AddChain(chain *cert.Chain, write bool) error
- func (s *Store) AddTRC(trc *trc.TRC, write bool) error
- func (s *Store) GetChain(ia addr.IA, ver uint64) *cert.Chain
- func (s *Store) GetNewestChain(ia addr.IA) *cert.Chain
- func (s *Store) GetNewestTRC(isd addr.ISD) *trc.TRC
- func (s *Store) GetTRC(isd addr.ISD, ver uint64) *trc.TRC
- func (s *Store) GetTRCList() []*trc.TRC
- func (s *Store) VerifyChain(subject addr.IA, chain *cert.Chain) error
Constants ¶
const ( IssSigKeyFile = "core-sig.seed" // TODO(roosd): rename "core-sig.key" -> "iss-sig.key" DecKeyFile = "as-decrypt.key" OffKeyFile = "offline-root.seed" OnKeyFile = "online-root.seed" SigKeyFile = "as-sig.seed" )
const ( ErrorOpen = "Unable to load key" ErrorParse = "Unable to parse key file" ErrorUnknown = "Unknown algorithm" )
const RawKey = "raw"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type KeyConf ¶
type KeyConf struct { // IssSigKey is the AS issuer signing Key. IssSigKey common.RawBytes // DecryptKey is the AS decryption key. DecryptKey common.RawBytes // OffRootKey is the AS offline root key. OffRootKey common.RawBytes // OnRootKey is the AS online root key. OnRootKey common.RawBytes // SignKey is the AS signing key. SignKey common.RawBytes }
func LoadKeyConf ¶
LoadKeyConf loads key configuration from specified path. issSigKey, onKey, offKey can be set true, to load the respective keys.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store handles storage and management of trust objects (certificate chains and TRCs)
func (*Store) AddChain ¶
AddChain adds a trusted certificate chain to the store. If write is true, the certificate chain is written to the filesystem (in case it does not already exist).
func (*Store) AddTRC ¶
AddTRC adds a trusted TRC to the store. If write is true, the TRC is written to the filesystem (in case it does not already exist).
func (*Store) GetChain ¶
GetChain returns the certificate chain for the specified values or nil, if it is not present.
func (*Store) GetNewestChain ¶
GetNewestChain returns the certificate chain with the highest version for the specified ISD-AS.
func (*Store) GetNewestTRC ¶
GetNewestTRC returns the TRC with the highest version for the specified ISD or nil, if there is no TRC present for that ISD.
func (*Store) GetTRC ¶
GetTRC returns the TRC for the specified values or nil, if it is not present.
func (*Store) GetTRCList ¶
GetTRCList returns a slice of the highest TRCs for all present ISDs.