Documentation
¶
Index ¶
- func ASFile(dir string, ia addr.IA, version scrypto.Version) string
- func AllTRCFiles(dir string, isd addr.ISD) string
- func IssuerFile(dir string, ia addr.IA, version scrypto.Version) string
- func KeysFile(dir string, ia addr.IA) string
- func TRCFile(dir string, isd addr.ISD, version scrypto.Version) string
- type AS
- type Issuer
- type KeyMeta
- type Keys
- type Primary
- type TRC2
- type Validity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllTRCFiles ¶
AllTRCFiles returns a glob string that matches all TRC files for the given isd.
func IssuerFile ¶
IssuerFile returns the file where the issuer certificate config is written to.
Types ¶
type AS ¶
type AS struct {
Description string `toml:"description"`
Version scrypto.Version `toml:"version"`
SigningKeyVersion *scrypto.KeyVersion `toml:"signing_key_version"`
EncryptionKeyVersion *scrypto.KeyVersion `toml:"encryption_key_version"`
RevocationKeyVersion *scrypto.KeyVersion `toml:"revocation_key_version"`
IssuerIA addr.IA `toml:"issuer_ia"`
IssuerCertVersion scrypto.Version `toml:"issuer_cert_version"`
OptDistPoints []addr.IA `toml:"optional_distribution_points"`
Validity Validity `toml:"validity"`
}
AS holds the AS certificate configuration.
func LoadAS ¶
LoadAS loads the AS certificate configuration from the provided file. The contents are already validated.
type Issuer ¶
type Issuer struct {
Description string `toml:"description"`
Version scrypto.Version `toml:"version"`
IssuingKeyVersion *scrypto.KeyVersion `toml:"issuing_key_version"`
RevocationKeyVersion *scrypto.KeyVersion `toml:"revocation_key_version"`
TRCVersion scrypto.Version `toml:"trc_version"`
OptDistPoints []addr.IA `toml:"optional_distribution_points"`
Validity Validity `toml:"validity"`
}
Issuer holds the issuer certificate configuration.
func LoadIssuer ¶
LoadIssuer loads the issuer certificate configuration from the provided file. The contents are already validated.
type Keys ¶
type Keys struct {
Primary map[trc.KeyType]map[scrypto.KeyVersion]KeyMeta
Issuer map[cert.KeyType]map[scrypto.KeyVersion]KeyMeta
AS map[cert.KeyType]map[scrypto.KeyVersion]KeyMeta
}
Keys holds the key configuration.
type Primary ¶
type Primary struct {
Attributes trc.Attributes `toml:"attributes"`
IssuingKeyVersion *scrypto.KeyVersion `toml:"issuing_key_version"`
VotingOnlineKeyVersion *scrypto.KeyVersion `toml:"voting_online_key_version"`
VotingOfflineKeyVersion *scrypto.KeyVersion `toml:"voting_offline_key_version"`
}
Primary holds the primary AS configuration.
type TRC2 ¶
type TRC2 struct {
Description string
Version scrypto.Version
BaseVersion scrypto.Version
VotingQuorum uint16
GracePeriod util.DurWrap
TrustResetAllowed *bool
Votes []addr.AS
Validity Validity
PrimaryASes map[addr.AS]Primary
}
TRC2 holds the TRC configuration. TODO(roosd): rename to TRC.
func LoadTRC ¶
LoadTRC loads the TRC configuration from the provided file. The contents are already validated.