Documentation

Overview

Package x509 parses X.509-encoded keys and certificates.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Certificate

type Certificate struct {
	*x509.Certificate

	SRVNames      []string
	XMPPAddresses []string
}

Certificate represents an X.509 certificate with additional fields for XMPP use.

func FromCertificate

func FromCertificate(crt *x509.Certificate) (*Certificate, error)

FromCertificate parses the Subject Alternative Name from the provided x509.Certificate and creates a new Certificate with the extra fields populated.

func ParseCertificate

func ParseCertificate(asn1Data []byte) (*Certificate, error)

ParseCertificate parses a single certificate from the given ASN.1 DER data.

Source Files