Documentation ¶
Index ¶
- type Identity
- func (i *Identity) CA() *certificate.Certificate
- func (i *Identity) Certificate() *certificate.Certificate
- func (i *Identity) Name() string
- func (i *Identity) PrivateKey() *privatekey.PrivateKey
- func (i *Identity) Sign(data ...[]byte) []byte
- func (i *Identity) ToBase64() (string, error)
- func (i *Identity) ToBytes() ([]byte, error)
- func (i *Identity) ToFile(file string) error
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Identity ¶
type Identity struct {
// contains filtered or unexported fields
}
Identity represents a loaded identity (X509 certificate and ECDSA private key pair).
func FromBase64 ¶
FromBase64 loads an identity from a base64 encoded string.
func (*Identity) CA ¶
func (i *Identity) CA() *certificate.Certificate
CA returns the loaded X509 CA.
func (*Identity) Certificate ¶
func (i *Identity) Certificate() *certificate.Certificate
Certificate returns the loaded X509 certificate.
func (*Identity) PrivateKey ¶
func (i *Identity) PrivateKey() *privatekey.PrivateKey
PrivateKey returns the loaded ECDSA private key.
type Option ¶
type Option func(*newIdentity)
Option is a type representing an option for creating a new identity.
func UsingSigner ¶
UsingSigner uses the specified identity to sign the new identity.
func WithOrganizationalUnit ¶
WithOrganizationalUnit sets the OU field in the new identity.
Click to show internal directories.
Click to hide internal directories.