lib

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2016 License: Apache-2.0 Imports: 27 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeX509ToJSON

func EncodeX509ToJSON(cert *x509.Certificate) []byte

EncodeX509ToJSON encodes an X.509 certificate into a JSON string.

func EncodeX509ToObject

func EncodeX509ToObject(cert *x509.Certificate) interface{}

EncodeX509ToObject encodes an X.509 certificate into a JSON-serializable object.

func EncodeX509ToPEM

func EncodeX509ToPEM(cert *x509.Certificate, headers map[string]string) *pem.Block

EncodeX509ToPEM converts an X.509 certificate into a PEM block for output.

func EncodeX509ToText

func EncodeX509ToText(cert *x509.Certificate) []byte

EncodeX509ToText encodes an X.509 certificate into human-readable text.

func IsSelfSigned

func IsSelfSigned(cert *x509.Certificate) bool

IsSelfSigned returns true iff the given certificate has a valid self-signature.

func ReadAsPEM

func ReadAsPEM(readers []io.Reader, format string, password func(string) string, callback func(*pem.Block)) error

ReadAsPEM will read PEM blocks from the given set of inputs. Input data may be in plain-text PEM files, DER-encoded certificates or PKCS7 envelopes, or PKCS12/JCEKS keystores. All inputs will be converted to PEM blocks and passed to the callback.

func ReadAsPEMFromFiles

func ReadAsPEMFromFiles(files []*os.File, format string, password func(string) string, callback func(*pem.Block)) error

ReadAsPEMFromFiles will read PEM blocks from the given set of inputs. Input data may be in plain-text PEM files, DER-encoded certificates or PKCS7 envelopes, or PKCS12/JCEKS keystores. All inputs will be converted to PEM blocks and passed to the callback.

func ReadAsX509

func ReadAsX509(readers []io.Reader, format string, password func(string) string, callback func(*x509.Certificate)) error

ReadAsX509 will read X.509 certificates from the given set of inputs. Input data may be in plain-text PEM files, DER-encoded certificates or PKCS7 envelopes, or PKCS12/JCEKS keystores. All inputs will be converted to X.509 certificates (private keys are skipped) and passed to the callback.

func ReadAsX509FromFiles

func ReadAsX509FromFiles(files []*os.File, format string, password func(string) string, callback func(*x509.Certificate)) error

ReadAsX509FromFiles will read X.509 certificates from the given set of inputs. Input data may be in plain-text PEM files, DER-encoded certificates or PKCS7 envelopes, or PKCS12/JCEKS keystores. All inputs will be converted to X.509 certificates (private keys are skipped) and passed to the callback.

Types

This section is empty.

Jump to

Keyboard shortcuts

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