Documentation ¶
Index ¶
- Constants
- func LoadKey(file 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.ISD_AS, ver uint64) *cert.Chain
- func (s *Store) GetNewestChain(ia *addr.ISD_AS) *cert.Chain
- func (s *Store) GetNewestTRC(isd uint16) *trc.TRC
- func (s *Store) GetTRC(isd uint16, ver uint64) *trc.TRC
- func (s *Store) GetTRCList() []*trc.TRC
Constants ¶
const ( CoreSigKeyFile = "core-sig.key" DecKeyFile = "as-decrypt.key" OffKeyFile = "offline-root.key" OnKeyFile = "online-root.key" SigKeyFile = "as-sig.key" )
const ( ErrorOpen = "Unable to load key" ErrorParse = "Unable to parse key" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type KeyConf ¶
type KeyConf struct { // CoreSigKey is the AS core signing Key. CoreSigKey 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. coreSigKey, 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.