Documentation ¶
Index ¶
Constants ¶
View Source
const ( ErrAsCertMissing = "AS Certificate section missing" ErrInvalidValidityDuration = "Invalid validity duration" ErrIssuerMissing = "Parameter Issuer not set in AS certificate" ErrTRCVersionNotSet = "Parameter TRCVersion not set in Base Certificate" ErrValidityDurationNotSet = "Validity duration not set" ErrVersionNotSet = "Parameter Version not set for Base Certificate" ErrInvalidSignAlgorithm = "Invalid sign algorithm" ErrInvalidEncAlgorithm = "Invalid encryption algorithm" )
View Source
const ( AsConfFileName = "as.ini" KeyAlgSectionName = "Key Algorithms" AsSectionName = "AS Certificate" IssuerSectionName = "Issuer Certificate" )
View Source
const ( ErrCoreIANotSet = "Core ASes are not specified" ErrInvalidCoreIA = "Invalid Core ASes" ErrInvalidGracePeriod = "Invalid Grace Period Duration" ErrQuorumTrcGreaterThanCoreIA = "QuorumTRC > # Core ASes" ErrQuorumTrcNotSet = "Quorum TRC not set" ErrTrcVersionNotSet = "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.