Skip to content

Windows build fails: tpm2.OpenTPM called with argument #22

Description

@amiralearning-admin

Building with GOOS=windows fails because tpm2.go:217 calls tpm2.OpenTPM("/dev/tpmrm0"), but the go-tpm library's Windows signature takes no arguments.

# github.com/anatol/clevis.go
tpm2.go:217:22: too many arguments in call to tpm2.OpenTPM
    have (string)
    want ()

Potential fix: add //go:build !windows to tpm2.go and provide a tpm2_windows.go with stub implementations that return an "unsupported" error, or gate the OpenTPM call behind a platform check.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions