certutil

package
v0.0.0-...-ea10e50 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2024 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//-u certusage      Specify certificate usage:
	//C 	 SSL Client
	//V 	 SSL Server
	//I 	 IPsec
	//L 	 SSL CA
	//A 	 Any CA
	//Y 	 Verify CA
	//S 	 Email signer
	//R 	 Email Recipient
	//O 	 OCSP status responder
	//J 	 Object signer
	CertUsageSSLClient           = "C"
	CertUsageSSLServer           = "V"
	CertUsageIPsec               = "I"
	CertUsageSSLCA               = "L"
	CertUsageAnyCA               = "A"
	CertUsageVerifyCA            = "y"
	CertUsageEmailSigner         = "S"
	CertUsageEmailRecipient      = "R"
	CertUsageOCSPStatusResponder = "O"
	CertUsageObjectSigner        = "J"
)
View Source
const (
	NewCertificateDatabase = "-N"
	NoPassword             = "--empty-password"
	CertDbDirectory        = "-d"

	InstallCert     = "-A"
	CertName        = "-n"
	TrustArgs       = "-t"
	TrustedPeer     = "P,p,p"
	TrustedImplicit = ",,"
	TrustedCA       = "C"

	Verify          = "-V"
	VerifySignature = "-e"
	CertUsage       = "-u"
	SSLServer       = "V"

	ListChain = "-O"
)
View Source
const (
	VALID         = "certutil: certificate is valid"
	EXPIRED       = "certutil: certificate is invalid: Peer's Certificate has expired."
	ISSUER_UNKOWN = "certutil: certificate is invalid: Peer's Certificate issuer is not recognized."
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Certutil

type Certutil struct {
	// contains filtered or unexported fields
}

func CertUtilFrom

func CertUtilFrom(dir string) (certutil Certutil)

func NewCertutil

func NewCertutil() (Certutil, error)

func NewCerutilInto

func NewCerutilInto(dir string) (certutil Certutil, err error)

func (Certutil) Delete

func (c Certutil) Delete() error

func (Certutil) Install

func (c Certutil) Install(cert *x509.Certificate) ([]byte, error)

-t trustargs Set the certificate trust attributes: trustargs is of the form x,y,z where x is for SSL, y is for S/MIME, and z is for code signing. Use ,, for no explicit trust. p prohibited (explicitly distrusted) P trusted peer c valid CA T trusted CA to issue client certs (implies c) C trusted CA to issue server certs (implies c) u user cert w send warning g make step-up cert

func (Certutil) ListChain

func (c Certutil) ListChain(cert *x509.Certificate) ([]Fingerprint, error)

func (Certutil) Verify

func (c Certutil) Verify(cert *x509.Certificate) ([]byte, error)

-u certusage Specify certificate usage: C SSL Client V SSL Server I IPsec L SSL CA A Any CA Y Verify CA S Email signer R Email Recipient O OCSP status responder J Object signer

type Fingerprint

type Fingerprint = string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL