Documentation ¶
Index ¶
- func CRLValidation(client *http.Client, crt *x509.Certificate, issuer *x509.Certificate, ...) (int, error)
- func OCSPValidation(client *http.Client, crt *x509.Certificate, issuer *x509.Certificate, ...) (int, []byte, error)
- type CRLCmd
- type CRLFetchCmd
- type CRLInfoCmd
- type CertInfoCmd
- type CertValidateCmd
- type CertsCmd
- type Cli
- func (c *Cli) AfterApply(_ *kong.Kong, _ kong.Vars) error
- func (c *Cli) Context() context.Context
- func (c *Cli) ErrWriter() io.Writer
- func (c *Cli) ReadFile(filename string) ([]byte, error)
- func (c *Cli) Reader() io.Reader
- func (c *Cli) WithErrWriter(out io.Writer) *Cli
- func (c *Cli) WithReader(reader io.Reader) *Cli
- func (c *Cli) WithWriter(out io.Writer) *Cli
- func (c *Cli) WriteJSON(value any)
- func (c *Cli) Writer() io.Writer
- type CsrInfoCmd
- type OCSPCmd
- type OCSPFetchCmd
- type OCSPInfoCmd
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CRLValidation ¶ added in v0.3.0
func CRLValidation(client *http.Client, crt *x509.Certificate, issuer *x509.Certificate, crlURL string) (int, error)
CRLValidation calls CRL Endpoint and check certificate in CRL
func OCSPValidation ¶ added in v0.3.0
func OCSPValidation(client *http.Client, crt *x509.Certificate, issuer *x509.Certificate, rawURL string) (int, []byte, error)
OCSPValidation calls OCSP server and validate certificate
Types ¶
type CRLCmd ¶ added in v0.3.0
type CRLCmd struct { Info CRLInfoCmd `cmd:"" help:"print CRL info"` Fetch CRLFetchCmd `cmd:"" help:"fetch CRL"` }
CRLCmd provides commands for CRL
type CRLFetchCmd ¶
type CRLFetchCmd struct { Cert string `kong:"arg" required:"" help:"certificate file name"` Output string `required:"" help:"output folder name"` All bool `help:"fetch entire chain"` Proxy string `help:"optional, proxy address or DC name"` Print bool }
CRLFetchCmd specifies flags for CRLFetch action
type CRLInfoCmd ¶ added in v0.3.0
type CRLInfoCmd struct {
In string `kong:"arg" required:"" help:"DER-encoded CRL"`
}
CRLInfoCmd prints crl info
type CertInfoCmd ¶
type CertInfoCmd struct { In string `kong:"arg" required:"" help:"certificate file name"` Out string `help:"optional, output file to save parsed certificates"` NotAfter string `help:"optional, filter certificates by NotAfter time"` NoExpired *bool `help:"optional, filter non-expired certificates"` Extensions bool `help:"optional, print extensions values"` }
CertInfoCmd specifies flags for CertInfo action
type CertValidateCmd ¶
type CertValidateCmd struct { Cert string `kong:"arg" required:"" help:"certificate file name"` CA string `help:"optional, CA bundle file"` Root string `help:"optional, Trusted Roots file"` Out string `help:"optional, output file to save certificate chain"` Revocation bool `help:"optional, validate certificate revocation status"` Proxy string `help:"optional, proxy address or DC name"` WithAIA bool `help:"optional, enable AIA to fetch intermediates"` }
CertValidateCmd specifies flags for Validate action
type CertsCmd ¶
type CertsCmd struct { Info CertInfoCmd `cmd:"" help:"print certificate info"` Validate CertValidateCmd `cmd:"" help:"validates certificate"` }
CertsCmd provides certificates commands
type Cli ¶
type Cli struct { Version ctl.VersionFlag `name:"version" help:"Print version information and quit" hidden:""` Timeout int `help:"HTTP timeout in seconds" default:"3"` // contains filtered or unexported fields }
Cli provides CLI context to run commands
func (*Cli) AfterApply ¶
AfterApply hook loads config
func (*Cli) WithErrWriter ¶
WithErrWriter allows to specify a custom error writer
func (*Cli) WithReader ¶
WithReader allows to specify a custom reader
func (*Cli) WithWriter ¶
WithWriter allows to specify a custom writer
type CsrInfoCmd ¶
type CsrInfoCmd struct {
Csr string `kong:"arg" required:"" help:"CSR file name"`
}
CsrInfoCmd specifies flags for Info command
type OCSPCmd ¶ added in v0.3.0
type OCSPCmd struct { Info OCSPInfoCmd `cmd:"" help:"prints OCSP info"` Fetch OCSPFetchCmd `cmd:"" help:"fetch OCSP from certificate"` }
OCSPCmd is the parent for crl command
type OCSPFetchCmd ¶ added in v0.3.0
type OCSPFetchCmd struct { Cert string `kong:"arg" required:"" help:"certificate file name"` CA string `help:"optional, CA bundle file"` Out string `help:"output folder name"` Proxy string `help:"optional, proxy address or DC name"` Print bool }
OCSPFetchCmd specifies flags to fetch OCSP
func (*OCSPFetchCmd) Run ¶ added in v0.3.0
func (a *OCSPFetchCmd) Run(ctx *Cli) error
Run the command
type OCSPInfoCmd ¶ added in v0.3.0
OCSPInfoCmd specifies flags for OCSP info command