Documentation ¶
Index ¶
- func FetchCertificates(url string) ([]*x509.Certificate, error)
- func ParseDN(dn string) (*pkix.Name, error)
- func ReadCertificates(filename string) ([]*x509.Certificate, error)
- func ServerCertificates(network string, addr string) ([]*x509.Certificate, error)
- type CertificateFactory
- type CertificateRequestFactory
- type Store
- type StoreEntries
- type StoreEntry
- type StoreEntryAttributes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchCertificates ¶
func FetchCertificates(url string) ([]*x509.Certificate, error)
Fetch X.509 certificates via the given URL.
func ReadCertificates ¶
func ReadCertificates(filename string) ([]*x509.Certificate, error)
Read X.509 certificates from the given file.
func ServerCertificates ¶
func ServerCertificates(network string, addr string) ([]*x509.Certificate, error)
Get the X.509 certificates used for encrypting the connection to the given server.
The server protocol must be TLS based (e.g. https, ldaps). The certificates are retrieved during the TLS handshake.
Types ¶
type CertificateFactory ¶
type CertificateFactory interface { Name() string New() (crypto.PrivateKey, *x509.Certificate, error) }
type CertificateRequestFactory ¶
type CertificateRequestFactory interface { Name() string New() (crypto.PrivateKey, *x509.CertificateRequest, error) }
type Store ¶
type Store interface { Name() string Entries() StoreEntries Entry(name string) (StoreEntry, error) }
type StoreEntries ¶
type StoreEntries interface { Reset() Next() StoreEntry }
type StoreEntry ¶
type StoreEntry interface { Name() string Store() Store HasKey() bool Key() (crypto.PrivateKey, error) HasCertificate() bool Certificate() (*x509.Certificate, error) HasCertificateRequest() bool CertificateRequest() (*x509.CertificateRequest, error) HasRevocationList() bool RevocationList() (*x509.RevocationList, error) Attributes() (*StoreEntryAttributes, error) }
type StoreEntryAttributes ¶
type StoreEntryAttributes struct {
Provider string `json:"provider"`
}
Click to show internal directories.
Click to hide internal directories.