Documentation ¶
Index ¶
- Constants
- func Set(c *Conf)
- type Conf
- func (c *Conf) GetDecryptKey() common.RawBytes
- func (c *Conf) GetIssSigningKey() common.RawBytes
- func (c *Conf) GetOnRootKey() common.RawBytes
- func (c *Conf) GetSigner() ctrl.Signer
- func (c *Conf) GetSigningKey() common.RawBytes
- func (c *Conf) GetVerifier() ctrl.SigVerifier
- func (c *Conf) LoadCustomers() (*Customers, error)
- func (c *Conf) SetSigner(signer ctrl.Signer)
- func (c *Conf) SetVerifier(verifier ctrl.SigVerifier)
- type Customers
Constants ¶
const ( // IssuerReissTime is the default value for Conf.IssuerReissTime. It is the same // as the leaf certificate validity period in order to provide optimal coverage. IssuerReissTime = cert.DefaultLeafCertValidity * time.Second // ReissReqRate is the default interval between two consecutive reissue requests. ReissReqRate = 10 * time.Second ErrorAddr = "Unable to load addresses" ErrorIssCert = "Unable to load issuer certificate" ErrorKeyConf = "Unable to load KeyConf" ErrorConfNil = "Unable to reload conf from nil value" ErrorStore = "Unable to load TrustStore" ErrorTopo = "Unable to load topology" ErrorTrustDB = "Unable to load trust DB" ErrorCustomers = "Unable to load Customers" )
const ( KeyChanged = "Verifying key has changed in the meantime" NotACustomer = "ISD-AS not in customer mapping" CustomersDir = "customers" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Conf ¶
type Conf struct { // ID is the element ID. ID string // Topo contains the names of all local infrastructure elements, a map // of interface IDs to routers, and the actual topology. Topo *topology.Topo // BindAddr is the local bind address. BindAddr *snet.Addr // PublicAddr is the public address. PublicAddr *snet.Addr // Store is the trust store. Store *trust.Store // TrustDB is the trust DB. TrustDB *trustdb.DB // Customers is a mapping from non-core ASes assigned to this core AS to their public // verifying key. Customers *Customers // ConfDir is the configuration directory. ConfDir string // StateDir is the state directory. StateDir string // LeafReissTime is the time between starting reissue requests and leaf cert expiration. LeafReissTime time.Duration // IssuerReissTime is the time between self issuing core cert and core cert expiration. IssuerReissTime time.Duration // ReissRate is the interval between two consecutive reissue requests. ReissRate time.Duration // RequestID is used to generate unique request IDs for the messenger RequestID messenger.Counter // contains filtered or unexported fields }
func ReloadConf ¶
ReloadConf loads a new configuration based on the old one.
func (*Conf) GetDecryptKey ¶
GetDecryptKey returns the decryption key of the current key configuration.
func (*Conf) GetIssSigningKey ¶
GetIssSigningKey returns the issuer signing key of the current key configuration.
func (*Conf) GetOnRootKey ¶
GetOnRootKey returns the online root key of the current key configuration.
func (*Conf) GetSigningKey ¶
GetSigningKey returns the signing key of the current key configuration.
func (*Conf) GetVerifier ¶
func (c *Conf) GetVerifier() ctrl.SigVerifier
GetVerifier returns the verifier of the current configuration.
func (*Conf) LoadCustomers ¶
LoadCustomers populates the mapping from assigned non-core ASes to their verifying key.
func (*Conf) SetVerifier ¶
func (c *Conf) SetVerifier(verifier ctrl.SigVerifier)
SetVerifier sets the verifier of the current configuration.
type Customers ¶
type Customers struct {
// contains filtered or unexported fields
}
Customers is a mapping from non-core ASes assigned to this core AS to their public verifying key.
func (*Customers) GetVerifyingKey ¶
GetVerifyingKey returns the verifying key from the requested AS and nil if it is in the mapping. Otherwise, nil and an error.