cfssl: Index | Files

package certinfo

import ""


Package Files


func ParseCSRFile Uses

func ParseCSRFile(csrFile string) (*x509.CertificateRequest, error)

ParseCSRFile uses the helper to parse an x509 CSR PEM file.

func ParseCSRPEM Uses

func ParseCSRPEM(csrPEM []byte) (*x509.CertificateRequest, error)

ParseCSRPEM uses the helper to parse an x509 CSR PEM.

type Certificate Uses

type Certificate struct {
    Subject            Name      `json:"subject,omitempty"`
    Issuer             Name      `json:"issuer,omitempty"`
    SerialNumber       string    `json:"serial_number,omitempty"`
    SANs               []string  `json:"sans,omitempty"`
    NotBefore          time.Time `json:"not_before"`
    NotAfter           time.Time `json:"not_after"`
    SignatureAlgorithm string    `json:"sigalg"`
    AKI                string    `json:"authority_key_id"`
    SKI                string    `json:"subject_key_id"`
    RawPEM             string    `json:"pem"`

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

func ParseCertificate Uses

func ParseCertificate(cert *x509.Certificate) *Certificate

ParseCertificate parses an x509 certificate.

func ParseCertificateDomain Uses

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

ParseCertificateDomain parses the certificate served by the given domain.

func ParseCertificateFile Uses

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

ParseCertificateFile parses x509 certificate file.

func ParseCertificatePEM Uses

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

ParseCertificatePEM parses an x509 certificate PEM.

func ParseSerialNumber Uses

func ParseSerialNumber(serial, aki string, dbAccessor certdb.Accessor) (*Certificate, error)

ParseSerialNumber parses the serial number and does a lookup in the data storage used for certificates. The authority key is required for the lookup to work and must be passed as a hex string.

type Name Uses

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 Uses

func ParseName(name pkix.Name) Name

ParseName parses a new name from a *pkix.Name

Package certinfo imports 11 packages (graph) and is imported by 104 packages. Updated 2019-04-14. Refresh now. Tools for package owners.