Documentation ¶
Index ¶
- type Ed25519Signer
- type HmacSigner
- type WrappedClient
- func (wc *WrappedClient) FromKeypair(privKey ed25519.PrivateKey, pubKey ed25519.PublicKey, importName string) (*Ed25519Signer, error)
- func (wc *WrappedClient) GenerateEd25519Signer(name string) (*Ed25519Signer, error)
- func (wc *WrappedClient) GenerateHmacSecret(name string, algo string) (*HmacSigner, error)
- func (wc *WrappedClient) GenerateMounts() error
- func (wc *WrappedClient) GetEd25519Signer(name string) (*Ed25519Signer, error)
- func (wc *WrappedClient) GetHmacSecret(name string) (*HmacSigner, error)
- func (wc *WrappedClient) ImportHmacSecret(secret []byte, importName string) (*HmacSigner, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ed25519Signer ¶ added in v0.4.0
Ed25519Signer signer / verifier that uses the vault transit backend
func (*Ed25519Signer) Public ¶ added in v0.4.0
func (vs *Ed25519Signer) Public() crypto.PublicKey
Public returns the public key
func (*Ed25519Signer) Sign ¶ added in v0.4.0
func (vs *Ed25519Signer) Sign(rand io.Reader, message []byte, opts crypto.SignerOpts) ([]byte, error)
Sign the included message using the vault held keypair. rand and opts are not used
func (*Ed25519Signer) String ¶ added in v0.4.0
func (vs *Ed25519Signer) String() string
String returns the public key as a hex encoded string
func (*Ed25519Signer) Verify ¶ added in v0.4.0
func (vs *Ed25519Signer) Verify(message, signature []byte, opts crypto.SignerOpts) (bool, error)
Verify the included signature over message using the vault held keypair. opts are not used
type HmacSigner ¶ added in v0.4.0
HmacSigner signer / verifier that uses the vault transit backend
func (*HmacSigner) HMACSha384 ¶ added in v0.4.0
func (vs *HmacSigner) HMACSha384(message []byte) ([]byte, error)
HMACSha384 the included message using the vault held keypair
type WrappedClient ¶ added in v0.4.0
WrappedClient holds an api client for interacting with vault
func Connect ¶
func Connect() (*WrappedClient, error)
Connect connects to the vaultsigner backend server, sets token written by vault
func (*WrappedClient) FromKeypair ¶ added in v0.4.0
func (wc *WrappedClient) FromKeypair(privKey ed25519.PrivateKey, pubKey ed25519.PublicKey, importName string) (*Ed25519Signer, error)
FromKeypair create a new vault transit key by importing privKey and pubKey under importName
func (*WrappedClient) GenerateEd25519Signer ¶ added in v0.4.0
func (wc *WrappedClient) GenerateEd25519Signer(name string) (*Ed25519Signer, error)
GenerateEd25519Signer create Ed25519Signer by generating a keypair with name using vault backend
func (*WrappedClient) GenerateHmacSecret ¶ added in v0.4.0
func (wc *WrappedClient) GenerateHmacSecret(name string, algo string) (*HmacSigner, error)
GenerateHmacSecret create hmac key using vault backend
func (*WrappedClient) GenerateMounts ¶ added in v0.4.0
func (wc *WrappedClient) GenerateMounts() error
GenerateMounts generates the appropriate mount points if they do not exist
func (*WrappedClient) GetEd25519Signer ¶ added in v0.4.0
func (wc *WrappedClient) GetEd25519Signer(name string) (*Ed25519Signer, error)
GetEd25519Signer gets a key pair but doesn't generate new key
func (*WrappedClient) GetHmacSecret ¶ added in v0.4.0
func (wc *WrappedClient) GetHmacSecret(name string) (*HmacSigner, error)
GetHmacSecret gets a key pair but doesn't generate new key
func (*WrappedClient) ImportHmacSecret ¶ added in v0.4.0
func (wc *WrappedClient) ImportHmacSecret(secret []byte, importName string) (*HmacSigner, error)
ImportHmacSecret create a new vault transit key by importing privKey under importName