notary: github.com/docker/notary/signer/client Index | Files

package client

import "github.com/docker/notary/signer/client"

Index

Package Files

signer_trust.go

func NewGRPCConnection Uses

func NewGRPCConnection(hostname string, port string, tlsConfig *tls.Config) (*grpc.ClientConn, error)

NewGRPCConnection is a convenience method that returns GRPC Client Connection given a hostname, endpoint, and TLS options

type NotarySigner Uses

type NotarySigner struct {
    // contains filtered or unexported fields
}

NotarySigner implements a RPC based Trust service that calls the Notary-signer Service

func NewNotarySigner Uses

func NewNotarySigner(conn *grpc.ClientConn) *NotarySigner

NewNotarySigner is a convenience method that returns NotarySigner given a GRPC connection

func (*NotarySigner) AddKey Uses

func (trust *NotarySigner) AddKey(role data.RoleName, gun data.GUN, k data.PrivateKey) error

AddKey adds a key

func (*NotarySigner) CheckHealth Uses

func (trust *NotarySigner) CheckHealth(d time.Duration, serviceName string) error

CheckHealth are used to probe whether the server is able to handle rpcs.

func (*NotarySigner) Create Uses

func (trust *NotarySigner) Create(role data.RoleName, gun data.GUN, algorithm string) (data.PublicKey, error)

Create creates a remote key and returns the PublicKey associated with the remote private key

func (*NotarySigner) GetKey Uses

func (trust *NotarySigner) GetKey(keyid string) data.PublicKey

GetKey retrieves a key by ID - returns nil if the key doesn't exist

func (*NotarySigner) GetPrivateKey Uses

func (trust *NotarySigner) GetPrivateKey(keyid string) (data.PrivateKey, data.RoleName, error)

GetPrivateKey retrieves by ID an object that can be used to sign, but that does not contain any private bytes. If the key doesn't exist, returns an error.

func (*NotarySigner) ListAllKeys Uses

func (trust *NotarySigner) ListAllKeys() map[string]data.RoleName

ListAllKeys not supported for NotarySigner

func (*NotarySigner) ListKeys Uses

func (trust *NotarySigner) ListKeys(role data.RoleName) []string

ListKeys not supported for NotarySigner

func (*NotarySigner) RemoveKey Uses

func (trust *NotarySigner) RemoveKey(keyid string) error

RemoveKey deletes a key by ID - if the key didn't exist, succeed anyway

type RemotePrivateKey Uses

type RemotePrivateKey struct {
    data.PublicKey
    // contains filtered or unexported fields
}

RemotePrivateKey is a key that is on a remote service, so no private key bytes are available

func NewRemotePrivateKey Uses

func NewRemotePrivateKey(pubKey data.PublicKey, sClient pb.SignerClient) *RemotePrivateKey

NewRemotePrivateKey returns RemotePrivateKey, a data.PrivateKey that is only good for signing. (You can't get the private bytes out for instance.)

func (*RemotePrivateKey) CryptoSigner Uses

func (pk *RemotePrivateKey) CryptoSigner() crypto.Signer

CryptoSigner returns a crypto.Signer tha wraps the RemotePrivateKey. Needed for implementing the interface.

func (*RemotePrivateKey) Private Uses

func (pk *RemotePrivateKey) Private() []byte

Private returns nil bytes

func (*RemotePrivateKey) Sign Uses

func (pk *RemotePrivateKey) Sign(rand io.Reader, msg []byte,
    opts crypto.SignerOpts) ([]byte, error)

Sign calls a remote service to sign a message.

func (*RemotePrivateKey) SignatureAlgorithm Uses

func (pk *RemotePrivateKey) SignatureAlgorithm() data.SigAlgorithm

SignatureAlgorithm returns the signing algorithm based on the type of PublicKey algorithm.

type RemoteSigner Uses

type RemoteSigner struct {
    RemotePrivateKey
}

RemoteSigner wraps a RemotePrivateKey and implements the crypto.Signer interface

func (*RemoteSigner) Public Uses

func (rs *RemoteSigner) Public() crypto.PublicKey

Public method of a crypto.Signer needs to return a crypto public key.

Package client imports 15 packages (graph). Updated 2018-07-28. Refresh now. Tools for package owners.