Documentation ¶
Index ¶
Constants ¶
View Source
const ( ErrAsCertMissing common.ErrMsg = "AS Certificate section missing" ErrInvalidValidityDuration common.ErrMsg = "Invalid validity duration" ErrIssuerMissing common.ErrMsg = "Parameter Issuer not set in AS certificate" ErrTRCVersionNotSet common.ErrMsg = "Parameter TRCVersion not set in Base Certificate" ErrValidityDurationNotSet common.ErrMsg = "Validity duration not set" ErrVersionNotSet common.ErrMsg = "Parameter Version not set for Base Certificate" ErrInvalidSignAlgorithm common.ErrMsg = "Invalid sign algorithm" ErrInvalidEncAlgorithm common.ErrMsg = "Invalid encryption algorithm" )
View Source
const ( AsConfFileName = "as.ini" KeyAlgSectionName = "Key Algorithms" AsSectionName = "AS Certificate" IssuerSectionName = "Issuer Certificate" )
View Source
const ( ErrCoreIANotSet common.ErrMsg = "Core ASes are not specified" ErrInvalidCoreIA common.ErrMsg = "Invalid Core ASes" ErrInvalidGracePeriod common.ErrMsg = "Invalid Grace Period Duration" ErrQuorumTrcGreaterThanCoreIA common.ErrMsg = "QuorumTRC > # Core ASes" ErrQuorumTrcNotSet common.ErrMsg = "Quorum TRC not set" ErrTrcVersionNotSet common.ErrMsg = "Version not set for TRC" )
View Source
const IsdConfFileName = "isd.ini"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type As ¶
type As struct { *AsCert `ini:"AS Certificate"` *IssuerCert `ini:"Issuer Certificate,omitempty"` *KeyAlgorithms `ini:"Key Algorithms,omitempty"` }
As contains the as.ini configuration parameters.
func LoadAsConf ¶
type BaseCert ¶
type BaseCert struct { Comment string `comment:"Description of the AS and certificate"` EncAlgorithm string `comment:"Encryption algorithm used by AS, e.g., curve25519xsalsa20poly1305"` SignAlgorithm string `comment:"Signing algotirhm used by AS, e.g., ed25519"` IssuingTime uint32 `comment:"Time of issuance as UNIX epoch. If 0 will be set to now."` TRCVersion uint64 `comment:"The version of the current TRC"` Version uint64 `comment:"The version of the certificate. Cannot be 0"` Validity time.Duration `ini:"-"` RawValidity string `ini:"Validity" comment:"The validity of the certificate as duration string, e.g., 180d or 36h"` }
BaseCert holds the parameters that are used to create certs.
func NewTemplateCertConf ¶
type IssuerCert ¶
type IssuerCert struct {
*BaseCert `ini:"Issuer Certificate"`
}
IssuerCert corresponds to the "Issuer Certificate" section.
type KeyAlgorithms ¶
type KeyAlgorithms struct { Online string `comment:"Signing algorithm used by Online Key, e.g., ed25519"` Offline string `comment:"Signing algorithm used by Offline Key, e.g., ed25519"` }
KeyAlgorithms corresponds to the "Key Algorithms" section
type Trc ¶
type Trc struct { Version uint64 `comment:"The version of the TRC. Must not be 0."` IssuingTime uint32 `comment:"Time of issuance as UNIX epoch. If 0 will be set to now."` Validity time.Duration `ini:"-"` RawValidity string `ini:"Validity" comment:"The validity of the certificate as duration string, e.g., 180d or 36h"` CoreIAs []addr.IA `ini:"-"` RawCoreIAs []string `ini:"CoreASes" comment:"The core ASes of this ISD as comma-separated list, e.g., 1-ff00:0:0,1-ff00:0:1"` GracePeriod time.Duration `ini:"-"` RawGracePeriod string `ini:"GracePeriod" comment:"The grace period for the previous TRC as duration string (see above)"` QuorumTRC uint32 `comment:"The number of core ASes needed to update the TRC"` }
Trc holds the parameters that are used to generate a Trc.
Click to show internal directories.
Click to hide internal directories.