Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CertificateType ¶
func CertificateType(cert *x509.Certificate) string
func ExtKeyUsageToString ¶
func ExtKeyUsageToString(extKeyUsage []x509.ExtKeyUsage) []string
ExtKeyUsageToString converts extended key usage integer values to strings
func KeyUsageToString ¶
KeyUsageToString converts key usage bit values to strings
func ValidityFormat ¶
Types ¶
type Certificate ¶
type Certificate struct {
// contains filtered or unexported fields
}
func (Certificate) ExpiryString ¶ added in v1.0.10
func (c Certificate) ExpiryString() string
func (Certificate) IsExpired ¶
func (c Certificate) IsExpired() bool
func (Certificate) String ¶
func (c Certificate) String() string
func (Certificate) SubjectString ¶ added in v1.0.10
func (c Certificate) SubjectString() string
func (Certificate) ToPEM ¶
func (c Certificate) ToPEM() []byte
type CertificateLocation ¶
type CertificateLocation struct { TLSVersion uint16 // only applicable for network certificates Path string Certificates Certificates VerifiedChains []Certificates // only applicable for network certificates }
func LoadCertificateFromClipboard ¶ added in v1.0.19
func LoadCertificateFromClipboard() (CertificateLocation, error)
func LoadCertificateFromStdin ¶
func LoadCertificateFromStdin() (CertificateLocation, error)
func LoadCertificatesFromFile ¶
func LoadCertificatesFromFile(fileName string) (CertificateLocation, error)
func LoadCertificatesFromNetwork ¶
func LoadCertificatesFromNetwork(addr string, tlsSkipVerify bool) (CertificateLocation, error)
func (CertificateLocation) Name ¶ added in v1.0.10
func (c CertificateLocation) Name() string
func (CertificateLocation) RemoveDuplicates ¶ added in v1.0.13
func (c CertificateLocation) RemoveDuplicates() CertificateLocation
func (CertificateLocation) RemoveExpired ¶ added in v1.0.9
func (c CertificateLocation) RemoveExpired() CertificateLocation
type CertificateLocations ¶ added in v1.0.9
type CertificateLocations []CertificateLocation
func (CertificateLocations) RemoveDuplicates ¶ added in v1.0.13
func (c CertificateLocations) RemoveDuplicates() CertificateLocations
func (CertificateLocations) RemoveExpired ¶ added in v1.0.9
func (c CertificateLocations) RemoveExpired() CertificateLocations
type Certificates ¶
type Certificates []Certificate
func FromBytes ¶
func FromBytes(data []byte) (Certificates, error)
FromBytes converts raw certificate bytes to certificate, if the supplied data is cert bundle (or chain) all the certificates will be returned
func FromX509Certificates ¶
func FromX509Certificates(cs []*x509.Certificate) Certificates
func (Certificates) RemoveDuplicates ¶ added in v1.0.13
func (c Certificates) RemoveDuplicates() Certificates
func (Certificates) RemoveExpired ¶ added in v1.0.9
func (c Certificates) RemoveExpired() Certificates
Click to show internal directories.
Click to hide internal directories.