Documentation
¶
Index ¶
Constants ¶
View Source
const (
// DefaultCertificateValidityMinutes is the default duration for ephemeral certificates
DefaultCertificateValidityMinutes = 5
)
Variables ¶
This section is empty.
Functions ¶
func DefaultHome ¶
func DefaultHome() string
DefaultHome is an alias for GetDefaultHome for backward compatibility
func GetDefaultHome ¶
func GetDefaultHome() string
GetDefaultHome returns the default path for the .signet directory
Types ¶
type Config ¶
type Config struct {
// Home is the path to the .signet directory
Home string
// IssuerDID is the DID of the signer
IssuerDID string
// CertificateValidityMinutes is the duration for ephemeral certificates
CertificateValidityMinutes int
// Algorithm is the signing algorithm to use (default: "ed25519").
// Supported values: "ed25519", "ml-dsa-44".
Algorithm string
}
Config holds the configuration for Signet CLI
func Load ¶
Load loads configuration from environment variables and defaults Priority: env vars > defaults
func (*Config) EnsureHome ¶
EnsureHome creates the .signet directory if it doesn't exist
func (*Config) ValidateHomePathRuntime ¶
ValidateHomePathRuntime performs runtime validation of the home directory path. This should be called before any operation that uses the home directory to prevent TOCTOU (Time-of-Check-Time-of-Use) attacks where a path could be changed after initial validation but before use.
Click to show internal directories.
Click to hide internal directories.