package
0.0.0-20240723192418-397b19c8a77e
Repository: https://github.com/snapcore/secboot.git
Documentation: pkg.go.dev
# Functions
GenerateSignedVariableUpdate generates a mock signed authenticated variable payload.
GenerateWinCertificateAuthenticode generates a mock detached authenticode signature for an image with the specified digest, signed by the supplied key.
MakeMockVars creates a new MockVars.
MakeVarPayload returns a byte slice from the supplied VarPayloadWriter.
NewLog creates a mock TCG log for testing.
No description provided by the author
NewMockHostEnvironmentWithOpts returns a new MockHostEnvironment.
NewMockSysfsDevice returns a new MockSysfsDevice.
NewSignatureListNullSHA256 returns a ESL containing a single SHA-256 digest generated from an empty message.
NewSignatureListX509 returns a ESL for the supplied X.509 certificate.
ReadSignatureDatabaseUpdate reads a signed signature database update from the supplied data and returns its authentication header and the decoded database.
ReadWinCertificateAuthenticodeDetached creates a new [efi.WinCertificateAuthenticode] structure from the supplied detached Authenticode signature.
WithAMD64Environment adds a [github.com/snapcore/secboot/efi/internal.HostEnvironmentAMD64] to the [MockHostEnvironment].
WithDelayedVirtMode queues to add the supplied virtualization mode and type to a [MockHostEnvironment].
WithVirtModeError queues to make [MockHostEnvironment.DetectVirtMode] return an error.
WithLog adds the supplied TCG log to a [MockHostEnvironment].
WithMockVars adds the supplied mock EFI variables to a [MockHostEnvironment].
WithSysfsDevices adds the supplied devices, keyed by class, to the [MockHostEnvironment].
WithTPMDevice adds the specified TPM device to a [MockHostEnvironment].
WithVirtMode adds the supplied virtualization mode and type to a [MockHostEnvironment].
WithVirtModeError makes [MockHostEnvironment.DetectVirtMode] return an error.
# Structs
LogOptions provides options for [NewLog].
MockHostEnvironment provides a mock host environment that can be used by both the efi and efi/preinstall packages.
MockSysfsDevice is a mock implementation of [internal_efi.SysfsDevice].
VarEntry describes the contents of a mock EFI variable.
# Interfaces
No description provided by the author
# Type aliases
MockHostEnvironmentOption is an option supplied to [NewMockHostEnvironmentWithOpts].
MockVars is a collection of mock EFI variables.