talos/internal/pkg/tpm/tpm_other.go
Andrey Smirnov 4189454441
fix: build of talosctl on non-Linux platforms
The code from `talosctl` imports transitively tpm package, so make it
build on non-Linux.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-12-26 18:53:51 +04:00

20 lines
464 B
Go

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
//go:build !linux
// Package tpm provides TPM 2.0 support.
package tpm
import (
"errors"
"github.com/google/go-tpm/tpm2/transport"
)
// Open a TPM device.
func Open() (transport.TPMCloser, error) {
return nil, errors.New("TPM device is not available")
}