Documentation ¶
Index ¶
- func ToCertificatePolicies(in []byte) ([]string, error)
- func ToExtendedKeyUsage(in []byte) ([]string, error)
- func ToGeneralNames(in []byte) ([]string, error)
- func ToKeyUsage(in []byte) ([]string, error)
- func ToRelativeDistinguishedName(in []byte) ([]string, error)
- func ToSignedCertificateTimestampList(in []byte) ([]byte, error)
- type AccessDescription
- type AuthorityKeyIdentifier
- type BasicConstraints
- type Certificate
- func (c Certificate) AuthorityKeyId() string
- func (c Certificate) DNSNames() []string
- func (c Certificate) Error() error
- func (c Certificate) ExtKeyUsage() []string
- func (c Certificate) Extensions() []Extension
- func (c Certificate) IPAddresses() []string
- func (c Certificate) IsCA() bool
- func (c Certificate) IsExpired() bool
- func (c Certificate) Issuer() string
- func (c Certificate) KeyUsage() []string
- func (c Certificate) NotAfter() time.Time
- func (c Certificate) NotBefore() time.Time
- func (c Certificate) SerialNumber() string
- func (c Certificate) SignatureAlgorithm() string
- func (c Certificate) SubjectKeyId() string
- func (c Certificate) SubjectString() string
- func (c Certificate) ToPEM() []byte
- func (c Certificate) Type() string
- func (c Certificate) Version() int
- type CertificateLocation
- func (c CertificateLocation) Chains() ([]Certificates, error)
- func (c CertificateLocation) IssuerLike(issuer string) CertificateLocation
- func (c CertificateLocation) Name() string
- func (c CertificateLocation) RemoveDuplicates() CertificateLocation
- func (c CertificateLocation) RemoveExpired() CertificateLocation
- func (c CertificateLocation) SortByExpiry() CertificateLocation
- func (c CertificateLocation) SubjectLike(subject string) CertificateLocation
- type CertificateLocations
- func (c CertificateLocations) IssuerLike(issuer string) CertificateLocations
- func (c CertificateLocations) RemoveDuplicates() CertificateLocations
- func (c CertificateLocations) RemoveExpired() CertificateLocations
- func (c CertificateLocations) SortByExpiry() CertificateLocations
- func (c CertificateLocations) SubjectLike(subject string) CertificateLocations
- type Certificates
- type DistributionPoint
- type Extension
- type GeneralName
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToCertificatePolicies ¶ added in v1.0.25
ToCertificatePolicies returns slice of "identifier: qualifier" values
func ToExtendedKeyUsage ¶ added in v1.0.25
func ToGeneralNames ¶ added in v1.0.25
ToGeneralNames returns slice of "type: value1, value2, valueX" strings
func ToKeyUsage ¶ added in v1.0.25
KeyUsage ::= BIT STRING { digitalSignature (0), nonRepudiation (1), -- recent editions of X.509 have -- renamed this bit to contentCommitment keyEncipherment (2), dataEncipherment (3), keyAgreement (4), keyCertSign (5), cRLSign (6), encipherOnly (7), decipherOnly (8) }
func ToRelativeDistinguishedName ¶ added in v1.0.25
ToRelativeDistinguishedName returns slice of "type: value" strings
func ToSignedCertificateTimestampList ¶ added in v1.0.26
Types ¶
type AccessDescription ¶ added in v1.0.26
func ToAuthorityInformationAccess ¶ added in v1.0.26
func ToAuthorityInformationAccess(in []byte) ([]AccessDescription, error)
type AuthorityKeyIdentifier ¶ added in v1.0.25
type AuthorityKeyIdentifier struct { KeyIdentifier []byte AuthorityCertIssuer []string AuthorityCertSerialNumber int }
AuthorityKeyIdentifier ::= SEQUENCE { keyIdentifier [0] KeyIdentifier OPTIONAL, authorityCertIssuer [1] GeneralNames OPTIONAL, authorityCertSerialNumber [2] CertificateSerialNumber OPTIONAL } -- authorityCertIssuer and authorityCertSerialNumber MUST both -- be present or both be absent
func ToAuthorityKeyIdentifier ¶ added in v1.0.25
func ToAuthorityKeyIdentifier(in []byte) (AuthorityKeyIdentifier, error)
type BasicConstraints ¶ added in v1.0.25
BasicConstraints ::= SEQUENCE { cA BOOLEAN DEFAULT FALSE, pathLenConstraint INTEGER (0..MAX) OPTIONAL }
func ToBasicConstraints ¶ added in v1.0.25
func ToBasicConstraints(in []byte) (BasicConstraints, error)
type Certificate ¶
type Certificate struct {
// contains filtered or unexported fields
}
func (Certificate) AuthorityKeyId ¶ added in v1.0.29
func (c Certificate) AuthorityKeyId() string
func (Certificate) DNSNames ¶ added in v1.0.29
func (c Certificate) DNSNames() []string
func (Certificate) Error ¶ added in v1.0.9
func (c Certificate) Error() error
func (Certificate) ExtKeyUsage ¶ added in v1.0.29
func (c Certificate) ExtKeyUsage() []string
ExtKeyUsage extended key usage string representation
func (Certificate) Extensions ¶ added in v1.0.25
func (c Certificate) Extensions() []Extension
func (Certificate) IPAddresses ¶ added in v1.0.29
func (c Certificate) IPAddresses() []string
func (Certificate) IsCA ¶ added in v1.0.29
func (c Certificate) IsCA() bool
func (Certificate) IsExpired ¶
func (c Certificate) IsExpired() bool
func (Certificate) Issuer ¶ added in v1.0.29
func (c Certificate) Issuer() string
func (Certificate) KeyUsage ¶ added in v1.0.29
func (c Certificate) KeyUsage() []string
func (Certificate) NotAfter ¶ added in v1.0.29
func (c Certificate) NotAfter() time.Time
func (Certificate) NotBefore ¶ added in v1.0.29
func (c Certificate) NotBefore() time.Time
func (Certificate) SerialNumber ¶ added in v1.0.29
func (c Certificate) SerialNumber() string
func (Certificate) SignatureAlgorithm ¶ added in v1.0.29
func (c Certificate) SignatureAlgorithm() string
func (Certificate) SubjectKeyId ¶ added in v1.0.29
func (c Certificate) SubjectKeyId() string
func (Certificate) SubjectString ¶ added in v1.0.10
func (c Certificate) SubjectString() string
func (Certificate) ToPEM ¶
func (c Certificate) ToPEM() []byte
func (Certificate) Type ¶ added in v1.0.28
func (c Certificate) Type() string
func (Certificate) Version ¶ added in v1.0.29
func (c Certificate) Version() int
type CertificateLocation ¶
type CertificateLocation struct { TLSVersion uint16 // only applicable for network certificates Path string Error error Certificates Certificates }
func LoadCertificateFromClipboard ¶ added in v1.0.19
func LoadCertificateFromClipboard() CertificateLocation
func LoadCertificateFromStdin ¶
func LoadCertificateFromStdin() CertificateLocation
func LoadCertificatesFromFile ¶
func LoadCertificatesFromFile(fileName string) CertificateLocation
func LoadCertificatesFromNetwork ¶
func LoadCertificatesFromNetwork(addr string, tlsSkipVerify bool) CertificateLocation
func (CertificateLocation) Chains ¶ added in v1.0.28
func (c CertificateLocation) Chains() ([]Certificates, error)
func (CertificateLocation) IssuerLike ¶ added in v1.0.24
func (c CertificateLocation) IssuerLike(issuer string) CertificateLocation
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
func (CertificateLocation) SortByExpiry ¶ added in v1.0.23
func (c CertificateLocation) SortByExpiry() CertificateLocation
func (CertificateLocation) SubjectLike ¶ added in v1.0.24
func (c CertificateLocation) SubjectLike(subject string) CertificateLocation
type CertificateLocations ¶ added in v1.0.9
type CertificateLocations []CertificateLocation
func (CertificateLocations) IssuerLike ¶ added in v1.0.24
func (c CertificateLocations) IssuerLike(issuer string) CertificateLocations
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
func (CertificateLocations) SortByExpiry ¶ added in v1.0.23
func (c CertificateLocations) SortByExpiry() CertificateLocations
func (CertificateLocations) SubjectLike ¶ added in v1.0.24
func (c CertificateLocations) SubjectLike(subject string) 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) IssuerLike ¶ added in v1.0.24
func (c Certificates) IssuerLike(issuer string) 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
func (Certificates) SortByExpiry ¶ added in v1.0.23
func (c Certificates) SortByExpiry() Certificates
func (Certificates) SubjectLike ¶ added in v1.0.24
func (c Certificates) SubjectLike(subject string) Certificates
type DistributionPoint ¶ added in v1.0.25
func ToCRLDistributionPoints ¶ added in v1.0.25
func ToCRLDistributionPoints(in []byte) ([]DistributionPoint, error)