Documentation
¶
Index ¶
Constants ¶
View Source
const NotAfterLayout = "20060102"
Variables ¶
View Source
var FarFuture = ValidityPeriod{ Days: 0, NotAfter: time.Date(2099, 12, 31, 23, 59, 0, 0, time.UTC), }
Functions ¶
Types ¶
type Config ¶
type Config struct {
Subject *dname.Config `yaml:"subject" flags:""`
Names san.Names `yaml:"subjectAltNames" flags:"subject-alt-name,set cert subjectAltNames,san"`
KeyUsage keyusage.KeyUsage `yaml:"keyUsage" flags:"key-usage,what the key/cert is used for (tlsServer, tlsClient, tlsClientServer),ku"`
Validity ValidityPeriod `yaml:"validity" flags:"validity,time duration/timestamp where the cert is valid to (examples: 30d, 1y, 20220530)"`
KeyType wcrypto.KeyType `yaml:"keyType" flags:"key-type,private key type (rsa, rcdsa),t"`
// Don't create issuedb entry.
NoIssueDBEntry bool
}
func ConfigFromCert ¶
func ConfigFromCert(cert *x509.Certificate) *Config
func DefaultConfig ¶
func DefaultConfig(env *cli.Environment) (*Config, error)
type ValidityPeriod ¶
type ValidityPeriod struct {
// Days specifies the number of days that the issued cert would be valid for.
// Days count is ignored if NotAfter is specified to non-zero.
Days uint
// NotAfter specifies the timestamp where the cert is considered valid to (inclusive).
NotAfter time.Time
}
func (ValidityPeriod) GetNotAfter ¶
func (p ValidityPeriod) GetNotAfter(base time.Time) time.Time
func (ValidityPeriod) String ¶
func (p ValidityPeriod) String() string
func (*ValidityPeriod) UnmarshalFlag ¶
func (p *ValidityPeriod) UnmarshalFlag(s string) error
func (*ValidityPeriod) UnmarshalYAML ¶
func (p *ValidityPeriod) UnmarshalYAML(unmarshal func(interface{}) error) error
Click to show internal directories.
Click to hide internal directories.