certinfo

package
v0.0.0-...-0681762 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2015 License: BSD-2-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Certificate

type Certificate struct {
	Subject            Name      `json:"subject,omitempty"`
	SANs               []string  `json:"sans,omitempty"`
	NotBefore          time.Time `json:"not_before"`
	NotAfter           time.Time `json:"not_after"`
	SignatureAlgorithm string    `json:"sigalg"`
	RawPEM             string    `json:"pem"`
}

Certificate represents a JSON description of an X.509 certificate.

func ParseCertificate

func ParseCertificate(cert *x509.Certificate) *Certificate

ParseCertificate parses an x509 certificate.

func ParseCertificateDomain

func ParseCertificateDomain(domain string) (cert *Certificate, err error)

ParseCertificateDomain parses the certificate served by the given domain.

func ParseCertificateFile

func ParseCertificateFile(certFile string) (*Certificate, error)

ParseCertificateFile parses x509 certificate file.

func ParseCertificatePEM

func ParseCertificatePEM(certPEM []byte) (*Certificate, error)

ParseCertificatePEM parses an x509 certificate PEM.

type Name

type Name struct {
	CommonName         string        `json:"common_name,omitempty"`
	SerialNumber       string        `json:"serial_number,omitempty"`
	Country            string        `json:"country,omitempty"`
	Organization       string        `json:"organization,omitempty"`
	OrganizationalUnit string        `json:"organizational_unit,omitempty"`
	Locality           string        `json:"locality,omitempty"`
	Province           string        `json:"province,omitempty"`
	StreetAddress      string        `json:"street_address,omitempty"`
	PostalCode         string        `json:"postal_code,omitempty"`
	Names              []interface{} `json:"names,omitempty"`
}

Name represents a JSON description of a PKIX Name

func ParseName

func ParseName(name pkix.Name) Name

ParseName parses a new name from a *pkix.Name

Jump to

Keyboard shortcuts

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