Documentation ¶
Overview ¶
Package awssigner contains a new signer that uses aws-kms as an hsm
Index ¶
- func NewKmsSigner(ctx context.Context, awsRegion, awsAccessKey, awsSecretAccessKey, keyID string) (_ signer.Signer, err error)
- type PubKeyData
- type Signer
- func (signingHandler *Signer) Address() common.Address
- func (signingHandler *Signer) Equals(o libp2p.Key) bool
- func (signingHandler *Signer) GetPublic() libp2p.PubKey
- func (signingHandler *Signer) GetTransactor(ctx context.Context, chainID *big.Int) (*bind.TransactOpts, error)
- func (signingHandler *Signer) PrivKey() libp2p.PrivKey
- func (signingHandler *Signer) Raw() ([]byte, error)
- func (signingHandler *Signer) Sign(bytes []byte) ([]byte, error)
- func (signingHandler *Signer) SignMessage(ctx context.Context, message []byte, hash bool) (signer.Signature, error)
- func (signingHandler *Signer) Type() pb.KeyType
- func (signingHandler *Signer) UnsafeMakePublicKeyData(ctx context.Context) (*PubKeyData, error)
- func (signingHandler *Signer) UnsafeSetKeyID(keyID string)
- func (signingHandler *Signer) UnsafeSetPubKeyData(pubKeyData *PubKeyData)
- type UnsafeSigner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PubKeyData ¶
type PubKeyData struct {
// contains filtered or unexported fields
}
PubKeyData is the public key data.
type Signer ¶
type Signer struct {
// contains filtered or unexported fields
}
Signer is an aws signer.
func (*Signer) Equals ¶ added in v0.2.0
Equals assumes we're using *libp2p.Secp256k1PublicKey type for o.
func (*Signer) GetTransactor ¶
func (signingHandler *Signer) GetTransactor(ctx context.Context, chainID *big.Int) (*bind.TransactOpts, error)
GetTransactor creates a kms transactor.
func (*Signer) SignMessage ¶
func (signingHandler *Signer) SignMessage(ctx context.Context, message []byte, hash bool) (signer.Signature, error)
SignMessage signs a hashed message.
func (*Signer) UnsafeMakePublicKeyData ¶ added in v0.2.0
func (signingHandler *Signer) UnsafeMakePublicKeyData(ctx context.Context) (*PubKeyData, error)
UnsafeMakePublicKeyData creates the public key data.
func (*Signer) UnsafeSetKeyID ¶ added in v0.2.0
UnsafeSetKeyID sets the key id.
func (*Signer) UnsafeSetPubKeyData ¶ added in v0.2.0
func (signingHandler *Signer) UnsafeSetPubKeyData(pubKeyData *PubKeyData)
UnsafeSetPubKeyData sets the public key data.
type UnsafeSigner ¶ added in v0.2.0
type UnsafeSigner interface { signer.Signer // UnsafeSetKeyID sets the key id. UnsafeSetKeyID(keyID string) // UnsafeSetPubKeyData sets the public key data. UnsafeSetPubKeyData(pubKeyData *PubKeyData) // UnsafeMakePublicKeyData creates the public key data. UnsafeMakePublicKeyData(ctx context.Context) (*PubKeyData, error) }
UnsafeSigner is an unsafe signer.
func MakeUnsafeSigner ¶ added in v0.2.0
func MakeUnsafeSigner(client *kms.Client) UnsafeSigner
MakeUnsafeSigner creates a new unsafe signer.
/ this is only to be used for testing. It should not be used in production code under any circumstances.
Directories ¶
Path | Synopsis |
---|---|
Package kmsmock sets up a mock kms server that is used for testing our kms driver TODO: we should consider moving this to a common testutils/mocking folder or something internal to avoid exporting
|
Package kmsmock sets up a mock kms server that is used for testing our kms driver TODO: we should consider moving this to a common testutils/mocking folder or something internal to avoid exporting |
internal
Package internal contains modules exported from local-kms in order to avoid rewriting code
|
Package internal contains modules exported from local-kms in order to avoid rewriting code |
Click to show internal directories.
Click to hide internal directories.