keytest

package
v0.0.0-...-04534a2 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MkECDSA

func MkECDSA(t *testing.T, a elliptic.Curve) ecdsa.PrivateKey

func MkImportableKey

func MkImportableKey(t *testing.T, tpm transport.TPMCloser, keytype tpm2.TPMAlgID, bits int, ownerauth []byte, userauth []byte, comment string) (*keyfile.TPMKey, error)

Helper to make an importable key

func MkImportableToLoadableKey

func MkImportableToLoadableKey(t *testing.T, tpm transport.TPMCloser, keytype tpm2.TPMAlgID, bits int, ownerauth []byte, userauth []byte, comment string) (*keyfile.TPMKey, error)

Ensure we can try the entire conversion flows from imported key -> loadable key

func MkKey

func MkKey(t *testing.T, tpm transport.TPMCloser, keytype tpm2.TPMAlgID, bits int, ownerauth []byte, userauth []byte, comment string) (*keyfile.TPMKey, error)

Test helper for CreateKey

func MkRSA

func MkRSA(t *testing.T, bits int) rsa.PrivateKey

func MustRand

func MustRand(size int) []byte

Give us some random bytes

Types

type KeyFunc

type KeyFunc func(t *testing.T, tpm transport.TPMCloser, keytype tpm2.TPMAlgID, bits int, ownerauth []byte, userauth []byte, comment string) (*keyfile.TPMKey, error)

Jump to

Keyboard shortcuts

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