kmiptest

package
v0.0.0-...-7e9f181 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TestCaseVersions = []string{"v1.0", "v1.1", "v1.2", "v1.3", "v1.4"}
View Source
var UnsupportedTestCases = []string{
	"v1.0/TC_134_10_Register_Key_Pair_Certify_and_Re_certify_Public_Key.xml",
	"v1.0/TC_NP_1_10_Put.xml",
	"v1.0/TC_NP_2_10_Notify_Put.xml",
	"v1.1/TC_134_11_Register_Key_Pair_Certify_and_Re_certify_Public_Key.xml",
	"v1.1/TC_NP_1_11_Put.xml",
	"v1.1/TC_NP_2_11_Notify_Put.xml",
	"v1.2/TC_134_12_Register_Key_Pair_Certify_and_Re_certify_Public_Key.xml",
	"v1.2/TC_NP_1_12_Put.xml",
	"v1.2/TC_NP_2_12_Notify_Put.xml",
	"v1.2/TC_SJ_1_12_Create_and_SplitJoin.xml",
	"v1.2/TC_SJ_2_12_Register_and_Split_Join.xml",
	"v1.2/TC_SJ_3_12_Join_Split_Keys.xml",
	"v1.2/TC_SJ_4_12_Register_and_Split_Join_with_XOR.xml",
	"v1.4/TC-DERIVEKEY-1-10.xml",
	"v1.4/TC-NP-1-14.xml",
	"v1.4/TC-SJ-1-14.xml",
}

Functions

func ListTestSuites

func ListTestSuites(t TestingT, root, version string) []string

func NewClientAndServer

func NewClientAndServer(t TestingT, hdl kmipserver.RequestHandler) *kmipclient.Client

func NewServer

func NewServer(t TestingT, hdl kmipserver.RequestHandler) (addr, ca string)

func TestingMiddleware

func TestingMiddleware(t TestingT) kmipclient.Middleware

Types

type TestCase

type TestCase struct {
	RequestMessage  kmip.RequestMessage
	ResponseMessage kmip.ResponseMessage
}

type TestSuite

type TestSuite struct {
	Version   string
	File      string
	TestCases []TestCase
}

func LoadTestSuite

func LoadTestSuite(t TestingT, root, version, file string) TestSuite

func (*TestSuite) DecodeTTLV

func (ts *TestSuite) DecodeTTLV(d *ttlv.Decoder) error

func (TestSuite) Name

func (ts TestSuite) Name() string

func (*TestSuite) UnmarshalXML

func (ts *TestSuite) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type TestingT

type TestingT interface {
	Errorf(format string, args ...any)
	FailNow()
	Cleanup(func())
}

TestingT is an interface wrapper around *testing.T.

Jump to

Keyboard shortcuts

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