mock

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Code generated by MockGen. DO NOT EDIT. Source: pkcs11.go

Generated by this command:

mockgen -source pkcs11.go -destination mock/pkcs11.go -package mock

Package mock is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockPkcs11

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

MockPkcs11 is a mock of Pkcs11 interface.

func NewMockPkcs11

func NewMockPkcs11(ctrl *gomock.Controller) *MockPkcs11

NewMockPkcs11 creates a new mock instance.

func (*MockPkcs11) CloseSession

func (m *MockPkcs11) CloseSession(ctx context.Context, session pkcs11.SessionHandle)

CloseSession mocks base method.

func (*MockPkcs11) CloseSessionAll added in v1.0.3

func (m *MockPkcs11) CloseSessionAll(ctx context.Context, slotID uint)

CloseSessionAll mocks base method.

func (*MockPkcs11) CreateXprivFromSeed added in v1.0.1

func (m *MockPkcs11) CreateXprivFromSeed(ctx context.Context, session pkcs11.SessionHandle, seedHandle pkcs11.ObjectHandle, xpubLabel, xprivLabel string, canExport bool) (pkcs11.ObjectHandle, pkcs11.ObjectHandle, error)

CreateXprivFromSeed mocks base method.

func (*MockPkcs11) DeriveEcKey added in v1.3.0

func (m *MockPkcs11) DeriveEcKey(ctx context.Context, session pkcs11.SessionHandle, basePrivkeyHandle pkcs11.ObjectHandle, data []byte, valueLen int) ([]byte, error)

DeriveEcKey mocks base method.

func (*MockPkcs11) DeriveKeyPairWithBIP32 added in v1.2.0

func (m *MockPkcs11) DeriveKeyPairWithBIP32(ctx context.Context, session pkcs11.SessionHandle, masterXprivHandle pkcs11.ObjectHandle, path []uint32, skLabel string) (pkcs11.ObjectHandle, pkcs11.ObjectHandle, error)

DeriveKeyPairWithBIP32 mocks base method.

func (*MockPkcs11) DestroyKey added in v1.2.0

func (m *MockPkcs11) DestroyKey(ctx context.Context, session pkcs11.SessionHandle, keyHandle pkcs11.ObjectHandle) error

DestroyKey mocks base method.

func (*MockPkcs11) EXPECT

func (m *MockPkcs11) EXPECT() *MockPkcs11MockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockPkcs11) ExportXpriv added in v1.0.1

func (m *MockPkcs11) ExportXpriv(ctx context.Context, session pkcs11.SessionHandle, xprivHandle pkcs11.ObjectHandle) (string, error)

ExportXpriv mocks base method.

func (*MockPkcs11) Finalize

func (m *MockPkcs11) Finalize(ctx context.Context)

Finalize mocks base method.

func (*MockPkcs11) FindKeyByLabel

func (m *MockPkcs11) FindKeyByLabel(ctx context.Context, session pkcs11.SessionHandle, label string) (pkcs11.ObjectHandle, error)

FindKeyByLabel mocks base method.

func (*MockPkcs11) GenerateKeyPairWithCurve added in v1.2.0

func (m *MockPkcs11) GenerateKeyPairWithCurve(ctx context.Context, session pkcs11.SessionHandle, mechanism *pkcs11.Mechanism, namedCurveOid []byte, keyType int, pubkeyLabel, privkeyLabel string, canExport bool) (pkcs11.ObjectHandle, pkcs11.ObjectHandle, error)

GenerateKeyPairWithCurve mocks base method.

func (*MockPkcs11) GenerateSeed added in v1.0.3

func (m *MockPkcs11) GenerateSeed(ctx context.Context, session pkcs11.SessionHandle, label string, length uint) (pkcs11.ObjectHandle, error)

GenerateSeed mocks base method.

func (*MockPkcs11) GenerateSignature

func (m *MockPkcs11) GenerateSignature(ctx context.Context, session pkcs11.SessionHandle, privkeyHandle pkcs11.ObjectHandle, mechanismType uint, message []byte) (pkcs110.SignatureBytes, error)

GenerateSignature mocks base method.

func (*MockPkcs11) GetCurrentSlot added in v1.0.3

func (m *MockPkcs11) GetCurrentSlot() (uint, bool)

GetCurrentSlot mocks base method.

func (*MockPkcs11) GetPkcs11Context added in v1.0.1

func (m *MockPkcs11) GetPkcs11Context() *pkcs11.Ctx

GetPkcs11Context mocks base method.

func (*MockPkcs11) GetPublicKey

func (m *MockPkcs11) GetPublicKey(ctx context.Context, session pkcs11.SessionHandle, pubkeyHandle pkcs11.ObjectHandle) (pkcs110.PublicKeyBytes, error)

GetPublicKey mocks base method.

func (*MockPkcs11) ImportEcKey added in v1.3.0

func (m *MockPkcs11) ImportEcKey(ctx context.Context, session pkcs11.SessionHandle, privkey []byte, label string, canExport bool) (pkcs11.ObjectHandle, error)

ImportEcKey mocks base method.

func (*MockPkcs11) ImportSeed added in v1.0.1

func (m *MockPkcs11) ImportSeed(ctx context.Context, session pkcs11.SessionHandle, seedBytes []byte, label string) (pkcs11.ObjectHandle, error)

ImportSeed mocks base method.

func (*MockPkcs11) ImportXpriv added in v1.0.1

func (m *MockPkcs11) ImportXpriv(ctx context.Context, session pkcs11.SessionHandle, xpriv, label string, canExport bool) (pkcs11.ObjectHandle, error)

ImportXpriv mocks base method.

func (*MockPkcs11) Initialize

func (m *MockPkcs11) Initialize(ctx context.Context) error

Initialize mocks base method.

func (*MockPkcs11) OpenSession

func (m *MockPkcs11) OpenSession(ctx context.Context, pin string) (pkcs11.SessionHandle, error)

OpenSession mocks base method.

func (*MockPkcs11) OpenSessionWithPartitionAndSlot added in v1.0.5

func (m *MockPkcs11) OpenSessionWithPartitionAndSlot(ctx context.Context, slotID, partitionID uint, pin string) (pkcs11.SessionHandle, error)

OpenSessionWithPartitionAndSlot mocks base method.

func (*MockPkcs11) OpenSessionWithSlot added in v1.1.2

func (m *MockPkcs11) OpenSessionWithSlot(ctx context.Context, slotID uint, pin string) (pkcs11.SessionHandle, error)

OpenSessionWithSlot mocks base method.

func (*MockPkcs11) ReLogin added in v1.0.1

func (m *MockPkcs11) ReLogin(ctx context.Context, session pkcs11.SessionHandle, pin string) error

ReLogin mocks base method.

func (*MockPkcs11) Verify added in v1.1.0

func (m *MockPkcs11) Verify(ctx context.Context, session pkcs11.SessionHandle, pubkeyHandle pkcs11.ObjectHandle, data, signature []byte) error

Verify mocks base method.

type MockPkcs11MockRecorder

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

MockPkcs11MockRecorder is the mock recorder for MockPkcs11.

func (*MockPkcs11MockRecorder) CloseSession

func (mr *MockPkcs11MockRecorder) CloseSession(ctx, session any) *gomock.Call

CloseSession indicates an expected call of CloseSession.

func (*MockPkcs11MockRecorder) CloseSessionAll added in v1.0.3

func (mr *MockPkcs11MockRecorder) CloseSessionAll(ctx, slotID any) *gomock.Call

CloseSessionAll indicates an expected call of CloseSessionAll.

func (*MockPkcs11MockRecorder) CreateXprivFromSeed added in v1.0.1

func (mr *MockPkcs11MockRecorder) CreateXprivFromSeed(ctx, session, seedHandle, xpubLabel, xprivLabel, canExport any) *gomock.Call

CreateXprivFromSeed indicates an expected call of CreateXprivFromSeed.

func (*MockPkcs11MockRecorder) DeriveEcKey added in v1.3.0

func (mr *MockPkcs11MockRecorder) DeriveEcKey(ctx, session, basePrivkeyHandle, data, valueLen any) *gomock.Call

DeriveEcKey indicates an expected call of DeriveEcKey.

func (*MockPkcs11MockRecorder) DeriveKeyPairWithBIP32 added in v1.2.0

func (mr *MockPkcs11MockRecorder) DeriveKeyPairWithBIP32(ctx, session, masterXprivHandle, path, skLabel any) *gomock.Call

DeriveKeyPairWithBIP32 indicates an expected call of DeriveKeyPairWithBIP32.

func (*MockPkcs11MockRecorder) DestroyKey added in v1.2.0

func (mr *MockPkcs11MockRecorder) DestroyKey(ctx, session, keyHandle any) *gomock.Call

DestroyKey indicates an expected call of DestroyKey.

func (*MockPkcs11MockRecorder) ExportXpriv added in v1.0.1

func (mr *MockPkcs11MockRecorder) ExportXpriv(ctx, session, xprivHandle any) *gomock.Call

ExportXpriv indicates an expected call of ExportXpriv.

func (*MockPkcs11MockRecorder) Finalize

func (mr *MockPkcs11MockRecorder) Finalize(ctx any) *gomock.Call

Finalize indicates an expected call of Finalize.

func (*MockPkcs11MockRecorder) FindKeyByLabel

func (mr *MockPkcs11MockRecorder) FindKeyByLabel(ctx, session, label any) *gomock.Call

FindKeyByLabel indicates an expected call of FindKeyByLabel.

func (*MockPkcs11MockRecorder) GenerateKeyPairWithCurve added in v1.2.0

func (mr *MockPkcs11MockRecorder) GenerateKeyPairWithCurve(ctx, session, mechanism, namedCurveOid, keyType, pubkeyLabel, privkeyLabel, canExport any) *gomock.Call

GenerateKeyPairWithCurve indicates an expected call of GenerateKeyPairWithCurve.

func (*MockPkcs11MockRecorder) GenerateSeed added in v1.0.3

func (mr *MockPkcs11MockRecorder) GenerateSeed(ctx, session, label, length any) *gomock.Call

GenerateSeed indicates an expected call of GenerateSeed.

func (*MockPkcs11MockRecorder) GenerateSignature

func (mr *MockPkcs11MockRecorder) GenerateSignature(ctx, session, privkeyHandle, mechanismType, message any) *gomock.Call

GenerateSignature indicates an expected call of GenerateSignature.

func (*MockPkcs11MockRecorder) GetCurrentSlot added in v1.0.3

func (mr *MockPkcs11MockRecorder) GetCurrentSlot() *gomock.Call

GetCurrentSlot indicates an expected call of GetCurrentSlot.

func (*MockPkcs11MockRecorder) GetPkcs11Context added in v1.0.1

func (mr *MockPkcs11MockRecorder) GetPkcs11Context() *gomock.Call

GetPkcs11Context indicates an expected call of GetPkcs11Context.

func (*MockPkcs11MockRecorder) GetPublicKey

func (mr *MockPkcs11MockRecorder) GetPublicKey(ctx, session, pubkeyHandle any) *gomock.Call

GetPublicKey indicates an expected call of GetPublicKey.

func (*MockPkcs11MockRecorder) ImportEcKey added in v1.3.0

func (mr *MockPkcs11MockRecorder) ImportEcKey(ctx, session, privkey, label, canExport any) *gomock.Call

ImportEcKey indicates an expected call of ImportEcKey.

func (*MockPkcs11MockRecorder) ImportSeed added in v1.0.1

func (mr *MockPkcs11MockRecorder) ImportSeed(ctx, session, seedBytes, label any) *gomock.Call

ImportSeed indicates an expected call of ImportSeed.

func (*MockPkcs11MockRecorder) ImportXpriv added in v1.0.1

func (mr *MockPkcs11MockRecorder) ImportXpriv(ctx, session, xpriv, label, canExport any) *gomock.Call

ImportXpriv indicates an expected call of ImportXpriv.

func (*MockPkcs11MockRecorder) Initialize

func (mr *MockPkcs11MockRecorder) Initialize(ctx any) *gomock.Call

Initialize indicates an expected call of Initialize.

func (*MockPkcs11MockRecorder) OpenSession

func (mr *MockPkcs11MockRecorder) OpenSession(ctx, pin any) *gomock.Call

OpenSession indicates an expected call of OpenSession.

func (*MockPkcs11MockRecorder) OpenSessionWithPartitionAndSlot added in v1.0.5

func (mr *MockPkcs11MockRecorder) OpenSessionWithPartitionAndSlot(ctx, slotID, partitionID, pin any) *gomock.Call

OpenSessionWithPartitionAndSlot indicates an expected call of OpenSessionWithPartitionAndSlot.

func (*MockPkcs11MockRecorder) OpenSessionWithSlot added in v1.1.2

func (mr *MockPkcs11MockRecorder) OpenSessionWithSlot(ctx, slotID, pin any) *gomock.Call

OpenSessionWithSlot indicates an expected call of OpenSessionWithSlot.

func (*MockPkcs11MockRecorder) ReLogin added in v1.0.1

func (mr *MockPkcs11MockRecorder) ReLogin(ctx, session, pin any) *gomock.Call

ReLogin indicates an expected call of ReLogin.

func (*MockPkcs11MockRecorder) Verify added in v1.1.0

func (mr *MockPkcs11MockRecorder) Verify(ctx, session, pubkeyHandle, data, signature any) *gomock.Call

Verify indicates an expected call of Verify.

Jump to

Keyboard shortcuts

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